CN116775786B - Geographic data image working method for repairing over-acute angle based on geotools - Google Patents

Geographic data image working method for repairing over-acute angle based on geotools Download PDF

Info

Publication number
CN116775786B
CN116775786B CN202310723905.0A CN202310723905A CN116775786B CN 116775786 B CN116775786 B CN 116775786B CN 202310723905 A CN202310723905 A CN 202310723905A CN 116775786 B CN116775786 B CN 116775786B
Authority
CN
China
Prior art keywords
rgb
row
column
matrix
representing
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
CN202310723905.0A
Other languages
Chinese (zh)
Other versions
CN116775786A (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.)
Chongqing Planning And Natural Resources Information Center
Original Assignee
Chongqing Planning And Natural Resources Information Center
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 Chongqing Planning And Natural Resources Information Center filed Critical Chongqing Planning And Natural Resources Information Center
Priority to CN202310723905.0A priority Critical patent/CN116775786B/en
Publication of CN116775786A publication Critical patent/CN116775786A/en
Application granted granted Critical
Publication of CN116775786B publication Critical patent/CN116775786B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Remote Sensing (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a geodata image working method for repairing an acute angle based on a geotools, which comprises the following steps: s-1, obtaining geographic data to be processed; s-2, repairing the geographical data in the step S-1 at an acute angle to obtain repaired geographical data. The invention can repair geographical data with over-acute angle and ensure the safety of image preservation.

Description

Geographic data image working method for repairing over-acute angle based on geotools
Technical Field
The invention relates to the technical field of geographic data, in particular to a working method for repairing a geographic data image with an acute angle based on a geotools.
Background
When importing data into the spatial index of the elastic search, since the spatial index of the elastic search requires that the spatial data is a graph without problems, repair is performed for the portion where the geometry is problematic. There is a geometry with an excessively acute angle, and for accuracy reasons, two points on the two sides of the excessively acute angle near the angle may be considered to be the same point, which would be considered to be a self-intersecting pattern.
Disclosure of Invention
The invention aims at least solving the technical problems in the prior art, and particularly creatively provides a geographical data image working method for repairing an acute angle based on a geotools.
In order to achieve the above object, the present invention provides a geodata image working method for repairing acute angles based on geotools, comprising the steps of:
s-1, obtaining geographic data to be processed;
s-2, repairing the geographical data in the step S-1 at an acute angle to obtain repaired geographical data.
In a preferred embodiment of the present invention, step S-2 is followed by step S-3, generating a geographic image from the repaired geographic data, and performing image export and storage on the generated geographic image.
In summary, by adopting the technical scheme, the method and the device can repair geographical data with too sharp angle and ensure the safety of image preservation.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the invention will become apparent and may be better understood from the following description of embodiments taken in conjunction with the accompanying drawings in which:
Fig. 1 is a schematic block diagram of a flow of the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
The invention discloses a geodata image working method for repairing acute angles based on a geotools, which is shown in fig. 1 and comprises the following steps:
s-1, obtaining geographic data to be processed;
s-2, repairing the geographical data in the step S-1 at an acute angle to obtain repaired geographical data.
In a preferred embodiment of the present invention, step S-2 is followed by step S-3, generating a geographic image from the repaired geographic data, and performing image export and storage on the generated geographic image.
In a preferred embodiment of the present invention, the method for repairing the geographical data at an acute angle in step S-2 comprises:
for geometries where this is the case, using a geokools tool, the vertices of the geometry are traversed to generate a circle buffered to one centimeter at the vertices, the two points of intersection of the circle with the original pattern are considered to be too sharp if the length is too short, and the angle is cut using the line intersecting the two points, and the sharp angle is removed from the resulting new geometry.
In a preferred embodiment of the present invention, the method further comprises outer ring and inner ring intersection repair for the geographic data, and the outer ring and inner ring intersection repair method comprises:
and traversing the coordinates of the geometric figure by using a geokools tool, finding the coordinates of points where the inner ring and the outer ring intersect, performing millimeter-level fine adjustment on the positions of the points where the inner ring and the outer ring intersect inwards, and obtaining a new geometric figure which is almost indistinguishable from the original geometric figure after adjustment.
In a preferred embodiment of the present invention, the method further includes performing self-intersection processing on the geographic data, where the processing method is:
for the geometry of the self-intersecting of the graph, a geokools tool is used for finding the self-intersecting part of the self-intersecting geometry, and then the original geometry is used for removing the self-intersecting part, so that the self-intersecting part is removed from the obtained geometry.
In a preferred embodiment of the present invention, the method further comprises the step of:
s-21, obtaining the number of the faces in the geographic data in the step S-1, wherein Q is denoted by Q, and Q is the number of the faces in the geographic data in the step S-1 respectively 1 、Q 2 、Q 3 、……、Q q ,Q 1 Coordinate point data representing the 1 st plane of the geographic data in step S-1, Q 2 Coordinate point data representing the 2 nd plane in the geographic data in step S-1, Q 3 Coordinate point data representing the 3 rd plane of the geographic data in step S-1, Q q Coordinate point data representing the q-th plane in the geographic data in step S-1; constructing a coordinate system, and enabling the surface count q' =1;
s-22, putting coordinate point data of the q' th surface into a coordinate system and connecting the coordinate point data in sequence to form a closed surface, wherein the method for forming the closed surface comprises the following steps:
s-221, obtaining the number of coordinate points in the q' th coordinate point data, and recording as w q′ ,w q′ The number of coordinate points in the q' th coordinate point data is expressed, and the number is respectively from left to right in turnW q′,1 Represents the 1 st coordinate point, W in the q' th plane coordinate point data q′,2 Represents the 2 nd coordinate point, W in the q' th plane coordinate point data q′,3 Representing the 3 rd coordinate point in the q' th plane coordinate point data,/th coordinate point>Represents the w in the q' th coordinate point data q′ A coordinate point; wherein, the 1 st coordinate point W in the q' th plane coordinate point data q′,1 The origin coordinate point in the q ' th coordinate point data and the w ' th coordinate point in the q ' th coordinate point data q′ Coordinate point->Is the end coordinate point in the q' th plane coordinate point data, and +.>
S-222, the 1 st coordinate point W in the q' th coordinate point data q′,1 And the 2 nd coordinate point W in the q' th plane coordinate point data q′,2 Connecting the 2 nd coordinate point W in the q' th coordinate point data q′,2 And the 3 rd coordinate point W in the q' th plane coordinate point data q′,3 Connecting the 3 rd coordinate point W in the q' th plane coordinate point data q′,3 And the 4 th coordinate point W in the q' th plane coordinate point data q′,4 Is connected to … …, the thW in q' -face coordinate point data q′ -1 coordinate pointAnd the 1 st coordinate point W in the q' th plane coordinate point data q′,1 Are connected;
s-223, go through step S - 222, obtaining that coordinate points within a graph enclosed by the line belong to a q' th surface;
s-23, judging the size relation between q' and q:
if q' is not less than q, executing the next step;
if q'<q, q '=q' +1, returning to step S - 22;
S-24, judging the coordinate point relation between the q 'face and the q' face:
if it isR q″ Representing a set of coordinate points contained in the q-th "face; r is R q″′ Representing a set of coordinate points contained in the q' th plane; u represents a logical relationship union, +.>Represent an empty set, q "∈ {1,2, 3., w. q′ },q″′∈{1,2,3,...,w q′ And q "noteq'", then the q "th plane R q″ With the q' th plane R q″′ Non-intersecting; it is not treated;
if it isR q″ Representing a set of coordinate points contained in the q-th "face; r is R q″′ Representing a set of coordinate points contained in the q' th plane; u represents a logical relationship union, +. >Represents a non-empty set, q "∈ {1,2, 3., w q′ },q″′∈{1,2,3,...,w q′ And q "noteq'", then the q "th plane R q″ With the q' th plane R q″′ Intersection:
if it isIf the number of the elements in the method is equal to 1, the method does not process the elements;
if it isIf the number of the elements is more than or equal to 2, executing the next step;
s-24, slaveOr->Any point W is taken out, and whether W belongs to R is judged q″ And R is q″′
If W is E R q″ And W.epsilon.R q″′ Then re-followOr->Taking out a point W' for judgment; up to->Or->Let w=w', execute the next step; />Represents a coordinate point set, W, in the q' th plane coordinate point data q″,1 Represents the 1 st coordinate point, W in the q' th plane coordinate point data q″,2 Represents the 2 nd coordinate point, W in the q' th plane coordinate point data q″,3 Representing the 3 rd coordinate point in the q' th plane coordinate point data,/th coordinate point>Represents the w in the q' th plane coordinate point data q″ A coordinate point; />Represents the coordinate point set, W in the q' -th plane coordinate point data q″′,1 Represents the 1 st coordinate point, W in the q' th plane coordinate point data q″′,2 Represents the 2 nd coordinate point, W in the q' -th plane coordinate point data q″′,3 Represents the 3 rd coordinate point in the q' th plane coordinate point data,/the coordinate point>Represents the w in the q' -th plane coordinate point data q″′ A coordinate point;
if it isOr->Executing the next step;
s-25, searching and enclosing into a q' plane R by taking W as a starting point coordinate point q″ And the q' -th plane R q″′ And (3) returning to the coordinate point corresponding to the broken line point, and taking W as an end point coordinate to obtain the coordinate point with the intersecting surface removed.
For example, the geographical data to be processed is multimolon ((11,15,55,51,11), (44,42,62,64,44), (91,82,71,91)).
In a first step, the geographical data MULTIPOLYGON to be processed (11,15,55,51,11), (44,42,62,64,44), (91,82,71,91)) has 3 faces, Q respectively 1 =POLYGON(11,15,55,51,11)、Q 2 =POLYGON(44,42,62,64,44)、Q 3 =POLYGON(91,82,71,91);
The second step, the number of coordinate points in the 1 st plane coordinate point data is 4, and the number of coordinate points is W from left to right in turn 1,1 =(1,1)、W 1,2 =(1,5)、W 1,3 =(5,5)、W 1,4 =(5,1)、W 1,5 =(1,1);
The number of coordinate points in the 2 nd coordinate point data is 4, and the number of coordinate points in the 2 nd coordinate point data is W respectively from left to right 2,1 =(4,4)、W 2,2 =(4,2)、W 2,3 =(6,2)、W 2,4 =(6,4)、W 2,5 =(4,4);
The number of coordinate points in the 3 rd plane coordinate point data is 3, and the number of coordinate points in the 3 rd plane coordinate point data is W respectively from left to right 3,1 =(9,1)、W 3,2 =(8,2)、W 3,3 =(7,1)、W 3,4 =(9,1);
Thirdly, connecting the coordinate point (1, 1) with the coordinate point (1, 5) straight line, connecting the coordinate point (1, 5) with the coordinate point (5, 5) straight line, connecting the coordinate point (5, 5) with the coordinate point (5, 1) straight line, and connecting the coordinate point (5, 1) with the coordinate point (1, 1) straight line; obtaining the 1 st surface;
connecting the coordinate points (4, 4) with the coordinate points (4, 2) straight line, connecting the coordinate points (4, 2) with the coordinate points (6, 2) straight line, connecting the coordinate points (6, 2) with the coordinate points (6, 4) straight line, and connecting the coordinate points (6, 4) with the coordinate points (4, 4) straight line; obtaining the 2 nd surface;
Connecting the coordinate point (9, 1) with the coordinate point (8, 2) straight line, connecting the coordinate point (8, 2) with the coordinate point (7, 1) straight line, and connecting the coordinate point (7, 1) with the coordinate point (9, 1); the 3 rd surface was obtained.
Fourth step, due to the coordinate point set R contained in the 1 st plane 1 And the coordinate point set R contained in the 2 nd surface 2 The union of (1) and (2) is present in a plurality of identical elements, and thus any point from { (1, 1), (1, 5), (5, 1) } or { (4, 4), (4, 2), (6, 4) } such as (4, 2) is due to (4, 2) ∈1 st plane R 1 And (4, 2) ∈2nd plane R 2 Thus, one point (5, 5) is reselected, since (5, 5)2 nd surface R 2 Therefore, the (5, 5) is taken as the starting point coordinate point to search and enclose the 1 st plane R 1 And the 2 nd plane R 2 Coordinate points corresponding to the broken line points of (1, 1), (1, 5) and (5, 5) are respectively (5, 4), (6, 2), (5, 2) and (1, 5) in sequence; then poly (55,54,64,62,52,11,15,55) and finally multi poly (ygon) (55,54,64,62,52,11,15,55), (91,82,71,91)). For multiple purposesThe intersecting geometric figures exist on a plurality of surfaces, or a geokools tool is used for establishing a buffer with the length of 0 for the geometric figures, and the two intersecting surfaces are consistent with the original geometric figures and have no intersection after buffering. Repair of face intersections, self-intersections, inner and outer ring intersections, and sharp corners may also be performed using prior art techniques.
In a preferred embodiment of the present invention, the method of outputting the generated geographical image comprises the steps of:
s1, acquiring width, height and resolution of an image to be derived, and respectively recording as K picture 、G picture And R is picture ,K picture Representing the width of the image to be derived in cm, cm representing the length in cm, G picture Representing the height of the image to be derived in cm, cm representing the length in cm, R picture Representing the resolution of the image to be derived; the unit is cm-1, and cm-1 represents the number of pixels per centimeter of resolution unit;
s2, generating a color matrix of the image to be exported according to the width, the height and the resolution of the image to be exported obtained in the step S1, and marking the color matrix as:
wherein RGB 1,1 Color values representing row 1 and column 1 in the image to be derived;
RGB 1,2 color values representing row 1 and column 2 in the image to be derived;
RGB 1,3 representing color values of row 1 and column 3 in the image to be derived;
RGB 1,B color values representing row 1, column B in the image to be derived; b=k picture ×R picture The method comprises the steps of carrying out a first treatment on the surface of the B represents the total number of transverse pixels of the image to be derived, K picture Representing the width of the image to be derived in cm, cm representing the length in cm, R picture Representing the resolution of the image to be derived; the unit is cm-1, and cm-1 represents the number of pixels per centimeter of resolution unit; when A is, When B comprises an integer part and a decimal part, the value of the integer part is +1, namely the integer part is rounded upwards.
RGB 2,1 Color values representing row 2 and column 1 in the image to be derived;
RGB 2,2 color values representing row 2 and column 2 in the image to be derived;
RGB 2,3 representing color values of row 2 and column 3 in the image to be derived;
RGB 2,B color values representing row 2, column B in the image to be derived;
RGB 3,1 color values representing row 3 and column 1 in the image to be derived;
RGB 3,2 color values representing row 3 and column 2 in the image to be derived;
RGB 3,3 representing color values of row 3 and column 3 in the image to be derived;
RGB 3,B a color value representing row 3, column B in the image to be derived;
RGB A,1 color values representing row a, column 1 in the image to be derived; a=g picture ×R picture The method comprises the steps of carrying out a first treatment on the surface of the A represents the total number of longitudinal pixels of an image to be derived, G picture Representing the height of the image to be derived in cm, cm representing the length in cm, R picture Representing the resolution of the image to be derived; the unit is cm-1, and cm-1 represents the number of pixels per centimeter of resolution unit;
RGB A,2 color values representing row a, column 2 in the image to be derived;
RGB A,3 representing color values of row a, column 3 in the image to be derived;
RGB A,B color values representing row a and column B in the image to be derived;
if a > B, a-B columns may be added to the rightmost side of the color matrix to form an a×a matrix:
Adding color values of columns a-B at the back side of the color matrix, wherein the color values are all 0, namely r= 0,G =0, and b=0; the A-B columns can be added at the leftmost side of the color matrix to form an A multiplied by A matrix.
If B > ase:Sub>A, B-ase:Sub>A rows may be added at the lowest side of the color matrix to form ase:Sub>A bxb matrix:
the color values of the B-A rows are added at the lower side of the color matrix and are all 0; the B-A rows may be added to the uppermost side of the color matrix to construct ase:Sub>A B X B matrix.
S3, generating a three-color character string matrix according to the color matrix in the step S2;
s4, generating a row-column character string matrix according to the row-column number of the color matrix in the step S2;
s5, generating a row-column three-color character string matrix according to the three-color character string matrix in the step S3 and the row-column character string matrix in the step S4;
s6, converting the three-row character strings in the three-row character string matrix into three-row character strings to obtain a three-row character string matrix;
s7, carrying out row and column adjustment on character strings in the three-color row and column character string matrix, wherein the row and column adjustment mode can be that the three-color row and column character strings are subjected to position random exchange, so as to obtain a row and column character string adjustment matrix;
and S8, writing the character strings in the row-column adjustment character string matrix into the text according to the sequence from left to right and from top to bottom, and obtaining and storing the character string text. This is the derivation of image data, and the import of image data is the inverse of the derivation of image data.
In a preferred embodiment of the present invention, the method for obtaining the rank string adjustment matrix includes the steps of:
s71, constructing an A multiplied by B three-color line character string matrix into an A 'multiplied by B' matrix block matrixA' is smallA positive integer equal to or less than A, B 'is a positive integer equal to or less than B, preferably A'>1,B′>1, a '=a, B' =b; the number of the three-color line character strings in the better matrix block is 2, 3, 4, 9, 16, 25, 36, 49 or 64, and the number of the three-color line character strings in each matrix block is equal, so that the row comparison number a "" =1 and the column comparison number b "" =1;
wherein, K' 1,1 Representing a 1 st row 1 st column matrix block in a matrix block matrix;
K′ 1,2 representing the 1 st row and 2 nd column matrix blocks in the matrix block matrix;
K′ 1,3 representing the 1 st row and 3 rd column matrix blocks in the matrix block matrix;
K′ 1,B′ representing a 1 st row, B' th column matrix block in a matrix block matrix;
K′ 2,1 representing the 2 nd row 1 st column matrix block in the matrix block matrix;
K′ 2,2 representing a 2 nd row and a 2 nd column matrix blocks in the matrix block matrix;
K′ 2,3 representing a 2 nd row 3 rd column matrix block in the matrix block matrix;
K′ 2,B′ representing a 2 nd row B' th column matrix block in the matrix block matrix;
K′ 3,1 representing the 3 rd row 1 st column matrix block in the matrix block matrix;
K′ 3,2 Representing a 3 rd row and a 2 nd column matrix block in a matrix block matrix;
K′ 3,3 representing a 3 rd row and a 3 rd column matrix block in a matrix block matrix;
K′ 3,B′ representing a 3 rd row, B' th column matrix block in the matrix block matrix;
K′ A′,1 representing the A' row 1 column matrix block in the matrix block matrix;
K′ A′,2 representing the A' row 2 column matrix block in the matrix block matrix;
K′ A′,3 representing the A' row 3 column matrix block in the matrix block matrix;
K′ A′,B′ representing an A 'th row and B' th column matrix block in a matrix block matrix;
s72, selecting a matrix block K 'in a matrix block matrix in which the a "" row b "" column three-color row character string of the three-color row and column character string matrix is located' a″″′,b″″′ A ' is not less than 1 and a ' is not more than 1 and B ' is a positive integer;
s73, judging K' a″″′,b″″′ Whether or not to be in the matrix block set { K' 1,1 ,K′ 1,2 ,K′ 1,3 ,…,K′ 1,B′ ,K′ 2,1 ,K′ 2,2 ,K′ 2,3 ,…,K′ 2,B′ ,K′ 3,1 ,K′ 3,2 ,K′ 3,3 ,…,K′ 3,B′ ,…,K′ A′,1 ,K′ A′,2 ,K′ A′,3 ,…,K′ A′,B′ In }:
if K' a″″′,b″″′ In the matrix block set, executing the next step;
if K' a″″′,b″″′ Not in the matrix block set, step S75 is performed;
s74, calculatingObtain a matrix result block K 'thereof' a″″″,b″″″ If represents the logical condition if,&represents a logic condition and a "represents a row set value, B" represents a column set value, 1.ltoreq.A '.ltoreq.A', 1.ltoreq.B '.ltoreq.B', with A ', B' being a positive integer;
s75, judging K' a″″″,b″″″ Logical relationship with the set of matrix blocks:
If K' a″″″,b″″″ Belongs to the matrix block set, and K 'in the matrix block matrix is obtained' a″″″,b″″″ And K' a″″″,b″″′ The positions are exchanged, and then K 'is used' a″″″,b″″″ And K' a″″″,b″″′ Deleting from the matrix block set, updating the matrix block set, and executing the next step;
if K' a″″″,b″″″ If the matrix block set does not belong to the matrix block set, executing the next step;
s76, judging the size relation between a 'and A':
if a 'is not less than A', executing the next step;
if a "" < a', a "" =a "" +1, return to step S72;
s77, judging the size relation between B 'and B':
if B 'is more than or equal to B', a row-column character string adjustment matrix is obtained at the moment:
wherein K is 1,1 ' represents the 1 st row 1 st column matrix block in the row-column string adjustment matrix; k (K) 1,2 ' represents the 1 st row and 2 nd column matrix blocks in the row-column string adjustment matrix; k (K) 1,3 ' represents the 1 st row and 3 rd column matrix blocks in the row-column string adjustment matrix; k (K) 1,B′ 'represents the 1 st row and B' th column matrix blocks in the row-column string adjustment matrix; k (K) 2,1 ' represents the 2 nd row 1 st column matrix block in the row-column string adjustment matrix; k (K) 2,2 ' represents the 2 nd row and 2 nd column matrix blocks in the row and column string adjustment matrix; k (K) 2,3 ' represents the 2 nd row and 3 rd column matrix blocks in the row-column string adjustment matrix; k (K) 2,B′ 'represents the 2 nd row and B' th column matrix blocks in the row and column string adjustment matrix; k (K) 3,1 ' represents the 3 rd row 1 st column matrix block in the row-column string adjustment matrix; k (K) 3,2 ' represents the 3 rd row and 2 nd column matrix blocks in the row-column string adjustment matrix; k (K) 3,3 ' represents the 3 rd row and 3 rd column matrix blocks in the row and column string adjustment matrix; k (K) 3,B′ 'represents the 3 rd row, B' th column matrix block in the row-column string adjustment matrix; k (K) A′,1 'represents the A' row 1 column matrix block in the row column string adjustment matrix; k (K) A′,2 'represents the A' row and 2 column matrix blocks in the row and column string adjustment matrix; k (K) A′,3 'represents the A' row 3 column matrix block in the row column string adjustment matrix; k (K) A′,B′ ' represent line and column charactersAn A 'th row and B' th column matrix block in the string adjustment matrix;
changing the row-column character string adjusting matrix into a general matrix;
if B "" < B', B "" =b "" +1, the process returns to step S72.
S76, S77 may be:
s76, judging the size relation between B 'and B':
if B 'is more than or equal to B', executing the next step;
if B "" < B', B "" =b "" +1, return to step S72;
s77, judging the size relation between a 'and A':
if a 'is more than or equal to A', a row-column character string adjustment matrix is obtained at the moment:
changing the row-column character string adjusting matrix into a general matrix;
If a "" < a', a "" =a "" +1, the process returns to step S72.
Assuming that the three-color-row-column character string matrix is an 8×6 three-color-row-column character string matrix, the matrix block matrix is a 4×2 matrix block matrix, a "=2, b" =1;
at this time, if the three-color line character string matrix is
The corresponding matrix block matrix is
Namely is
The rank string adjustment matrix is:
changing the rank string adjustment matrix into a general matrix:
in a preferred embodiment of the present invention, in step S72, a matrix block K in which the a "row" and b "th column three-color-row character string of the three-color-row character string matrix is located is selected a″″′,b″″′ The method of (1) is as follows:
wherein,representing an upward rounding; if represents a logical conditional if; e represents the logical sign of the element and the set, belonging to; n represents a set of natural numbers; int () represents an integer part; />Logical symbols representing elements and collections do not belong to;
for example, in a first step, assume that the width of the image to be derived is 0.15mm, the height is 0.1mm and the resolution is obtainedThe ratio was 200cm-1, at which time the total number of vertical pixels A=G picture ×R picture =0.01×200=2, the total number of horizontal pixels b=k picture ×R picture =0.015×200=3。
Second, the color matrix of the image to be derived is a 2×3 matrix:
the color values of the color matrix of the image to be exported are all octal;
Numerical value-character system comparison table
Third, changing the 2×3 matrix into a 3×3 matrix:
fourth, changing the octal matrix into a decimal matrix:
fifth, changing the decimal matrix into hexadecimal matrix:
sixth, the hexadecimal matrix is changed into a hexadecimal matrix with the same bit number (four bits are equivalent to R, G, B, namely 16-bit depth RGB, 8-bit depth RGB, 2-bit hexadecimal bit number of 8-bit depth RGB, 32-bit depth RGB, and 8-bit hexadecimal bit number of 32-bit depth RGB) as follows:
seventh, changing the hexadecimal matrix with the same bit number into a trichromatic character string matrix:
eighth step, generating a row number matrix of the color matrix:
ninth, changing the row number matrix into a decimal matrix:
tenth, changing the decimal matrix into hexadecimal matrix:
eleventh step, changing the hexadecimal matrix into a four-bit hexadecimal matrix:
twelfth, changing the four-bit hexadecimal matrix into a row-column character string matrix:
thirteenth step, generating a three-color string matrix of rows and columns by using the three-color string matrix and the three-color string matrix of rows and columns:
fourteenth step, changing the three-color character string matrix of the rows and columns into a sixty binary matrix:
fifteenth step, changing the sixty binary matrix into a twelve-bit sixty-binary matrix, namely a three-color row-column character string matrix:
Sixteenth, writing the character strings in the matrix into the text according to the sequence from left to right and from top to bottom to obtain a character string text:
0lYHOz1k4N050lYJ6SJDeqgx0lYKPuIRSNHr0HXnWg17zhB70HXpoB4p0XbV0HXqr198SqdV13W48FzPS1eU13W5qB6nfbP213W6IwCUCmpa。
the text may be written in order from right to left and from top to bottom to obtain a text of the character string:
0lYKPuIRSNHr0lYJ6SJDeqgx0lYHOz1k4N050HXqr198SqdV0HXpoB4p0XbV0HXnWg17zhB713W6IwCUCmpa13W5qB6nfbP213W48FzPS1eU。
the text can be written from top to bottom and from left to right to obtain the text of the character string:
0l YHOz1k4N050HXnWg17zhB713W48FzPS1eU0lYJ6SJDEQgX0HXPOB4p0XbV W5qB6nfbP20l YKPuiRRSNHr 0HXqr198SqdV13W6 IwcUCCmpa. Other writing sequences are not listed.
The sixteenth step may be the following steps:
sixteenth, performing row and column adjustment on character strings in the three-color row and column character string matrix to obtain a row and column character string adjustment matrix:
at this time a "=2, b" =1.
Seventeenth, writing the character strings in the matrix into the text according to the sequence from left to right and from top to bottom to obtain a character string text:
0lYHOz1k4N050lYJ6SJDeqgx0lYKPuIRSNHr13W5qB6nfbP213W6IwCUCmpa0HXqr198SqdV13W48FzPS1eU0HXnWg17zhB70HXpoB4p0XbV。
the sixteenth step may be the following steps:
sixteenth, changing the three-color rank character string matrix into a random matrix by a random mode (the random mode is not suitable for decryption, and is not recommended to be the mode):
seventeenth, writing the character strings in the matrix into the text according to the sequence from left to right and from top to bottom to obtain a character string text:
0HXpoB4p0XbV13W6IwCUCmpa13W48FzPS1eU13W5qB6nfbP20lYHOz1k4N050HXqr198SqdV0lYKPuIRSNHr0HXnWg17zhB70lYJ6SJDeqgx。
In a preferred embodiment of the present invention, in step S6, the method for obtaining a trichromatic matrix of strings includes the steps of:
s60, let row number a '"=1, and column number b'" =1;
s61, acquiring a row and column three-color character string of an a 'th row and a b' th column in a row and column three-color character string matrix;
s62, converting an a '-th row, b' -th column three-color character string in the three-color character string matrix into an I system, wherein I is larger than C; preferably, i=62, c=16.
S63, judging the size relation between B' and B:
if B' "is greater than or equal to B, executing the next step;
if B ' "< B, B '" =b ' "+1, return to step S61;
s64, judging the size relation between a' and A:
if a' > A, forming a three-color column and row character string matrix:
executing the next step;
if a ' "< a, a '" =a ' "+1, return to step S61;
s65, counting the number of bits of each row of character strings in the three-color-column row character string matrix, sequentially arranging the number of bits of each column of character strings in each row of the three-color-column row character string matrix in the order from large to small, taking the number of bits of the first character string, and marking as h, wherein h represents the number of bits of the first character string;
s66, if the number of bits of each column character string of each row in the three-color column row character string matrix is not equal to h, an identifier is added to the left side of each column character string of each row in the three-color column row character string matrix, wherein the identifier is 0, and other characters except uppercase letters A-Z, lowercase letters a-Z and numbers 0-9 can be used, for example-! The @, #, $, Z,%, ++, & x, and the like, so that the number of bits of each row and each column of character strings in the three-color row character string matrix is equal to h; at this time, an AxB three-color line character string matrix is obtained.
In a preferred embodiment of the present invention, a method of generating a matrix of three-color strings from the matrix of three-color strings and the matrix of three-color strings comprises the steps of:
s51, let row combination number a "=1, and column combination number b" =1;
s52, placing the three-color character strings of the a 'row and b' column in the three-color character string matrix on the right side of the row character strings of the a 'row and b' column in the row and column character string matrix, or placing the three-color character strings of the a 'row and b' column in the three-color character string matrix on the left side of the row and column character strings of the a 'row and b' column in the row and column character string matrix, and forming the a 'row and b' column three-color character strings in the row and column three-color character string matrix at the moment;
s53, if B' is more than or equal to B, executing the next step;
if B "< B, B" =b "+1, return to step S52;
s54, judging the size relation between a' and A:
if a'. Gtoreq.A, forming a matrix of three-color character strings of rows and columns:
if a "< a, a" =a "+1, the process returns to step S52.
In a preferred embodiment of the present invention, the method of generating a matrix of row and column strings from the number of rows and columns of a color matrix comprises the steps of:
s40, let the row number a '=1, and the column number b' =1;
S41, obtaining color value RGB a′,b′ The matrix row number comprises a row number and a column number;
s42, judging whether the row number and the column number are C:
if the number of the row number and the number of the column number are both C, executing the next step;
if the row number and the column number are not all C-ary, converting the row number and the column number into C-ary; executing the next step;
s43, judging whether the number of row numbers and the number of column numbers are H digits or not:
if the number of the row number and the number of the column number are both H digits, and the preferred H=4, executing the next step;
if the number of the row number and the number of the column number are not all H digits, converting the number of the row number and the number of the column number into H digits; the method for converting the number of the row and the number of the column into the H bit number comprises the following steps: supplementing a marker to the left of the row number and the column number, wherein the marker is 0, so that the row number and the column number meet the H number, and executing the next step;
s44, placing the row number on the left side of the column number, and forming an a 'row and b' column row string at the moment;
s45, judging the size relation between B' and B:
if B' is not less than B, executing the next step;
if B ' < B, B ' =b ' +1, returning to step S41;
s46, judging the size relation between a' and A:
if a'. Gtoreq.A, forming a row-column character string matrix:
Wherein R is 1 Representing color values RGB 1,1 A C-system row number corresponding to the row number of the (C);
C 1 representing color values RGB 1,1 A C-system column number corresponding to the column number of (a);
R 1 C 1 r represents 1 、C 1 According to the 1 st row and 1 st column character strings which are arranged from left to right;
C 2 representing color values RGB 1,2 A C-system column number corresponding to the column number of (a);
R 1 C 2 r represents 1 、C 2 According to the 1 st row and 2 nd column character strings which are arranged from left to right;
C 3 representing color values RGB 1,3 A C-system column number corresponding to the column number of (a);
R 1 C 3 r represents 1 、C 3 According to the 1 st row and 3 rd column character strings which are arranged from left to right;
C B representing color values RGB 1,B A C-system column number corresponding to the column number of (a);
R 1 C B r represents 1 、C B According to the row 1, the column B and the row string which are arranged from left to right;
R 2 representing color values RGB 2,1 A C-system row number corresponding to the row number of the (C);
R 2 C 1 r represents 2 、C 1 According to arrangements from left to rightThe obtained row 2 and column 1 character string;
R 2 C 2 r represents 2 、C 2 According to the 2 nd row and 2 nd column character strings which are arranged from left to right;
R 2 C 3 r represents 2 、C 3 According to the row 2 and the column 3 of the character strings which are arranged from left to right;
R 2 C B r represents 2 、C B According to the row-2, column-B and line character strings which are arranged from left to right;
R 3 C 1 r represents 3 、C 1 According to the 3 rd row and 1 st column character strings which are arranged from left to right;
R 3 C 2 R represents 3 、C 2 According to the 3 rd row and 2 nd column character strings which are arranged from left to right;
R 3 C 3 r represents 3 、C 3 According to the 3 rd row and 3 rd column character strings which are arranged from left to right;
R 3 C B r represents 3 、C B According to the 3 rd row and the B th row and column character strings which are arranged from left to right;
R A C 1 r represents A 、C 1 According to the A line and 1 st column character string which are arranged from left to right;
R A C 2 r represents A 、C 2 According to the row A and the row 2 of the character strings which are arranged from left to right;
R A C 3 r represents A 、C 3 According to the A-th row and 3-rd column character strings which are arranged from left to right;
R A C B r represents A 、C B According to the row character strings of A row and B column which are arranged from left to right;
if a ' < a, a ' =a ' +1, the process returns to step S41.
In a preferred embodiment of the present invention, the method of generating a trichromatic character string matrix from a color matrix comprises the steps of:
s31, let row increment a=1, column increment b=1;
s32, judging RGB a,b Whether the red, green and blue values in (a) are C-ary:
if RGB a,b The red value, the green value and the blue value of the color are all C-scale, and then the next step is executed;
if RGB a,b The red value, the green value and the blue value of the color are not all C-scale, and RGB is obtained a,b The red value, the green value and the blue value in the (B) are converted into C scale; executing the next step;
S33, judging RGB a,b Whether the red, green and blue values are D-bit numbers:
if RGB a,b The red value, the green value and the blue value of the color are all D digits, preferably, D=4, and then the next step is executed;
if RGB a,b The red value, the green value and the blue value of the red color value are not all D digits, and RGB is obtained a,b The red value, the green value and the blue value of the color register are converted into D bit numbers; executing the next step;
s34, RGB is processed a,b Green value of (b) is placed in RGB a,b To the right of the red value in (b), RGB a,b Blue values of (a) are placed in RGB a,b The right side of the green value in (a) is formed into a three-color character string of an a-th row and a b-th column;
s35, judging the size relation between B and B:
if B is more than or equal to B, executing the next step;
if B < B, b=b+1, returning to step S32;
s36, judging the size relation between a and A:
if a is more than or equal to A, a three-color character string matrix is formed:
wherein RGB 1,1 (R) C Representing RGB 1,1 A C-ary red value of (b);
RGB 1,1 (G) C representing RGB 1,1 A C-ary green value of (b);
RGB 1,1 (B) C representing RGB 1,1 A C-ary blue value of (b);
RGB 1,1 (R) C RGB 1,1 (G) C RGB 1,1 (B) C representing red values RGB 1,1 (R) C Green value RGB 1,1 (G) C And blue value RGB 1,1 (B) C According to the 1 st row and 1 st column three-color character strings which are arranged from left to right;
RGB 1,2 (R) C representing RGB 1,2 A C-ary red value of (b);
RGB 1,2 (G) C representing RGB 1,2 A C-ary green value of (b);
RGB 1,2 (B) C representing RGB 1,2 A C-ary blue value of (b);
RGB 1,2 (R) C RGB 1,2 (G) C RGB 1,2 (B) C Representing red values RGB 1,2 (R) C Green value RGB 1,2 (G) C And blue value RGB 1,2 (B) C According to the 1 st row and 2 nd column three-color character strings which are arranged from left to right;
RGB 1,3 (R) C representing RGB 1,3 A C-ary red value of (b);
RGB 1,3 (G) C representing RGB 1,3 A C-ary green value of (b);
RGB 1,3 (B) C representing RGB 1,3 A C-ary blue value of (b);
RGB 1,3 (R) C RGB 1,3 (G) C RGB 1,3 (B) C representing red values RGB 1,3 (R) C Green value RGB 1,3 (G) C And blue value RGB 1,3 (B) C According to the three-color character strings of the 1 st row and the 3 rd column which are arranged from left to right;
RGB 1,B (R) C representing RGB 1,B A C-ary red value of (b);
RGB 1,B (G) C representing RGB 1,B A C-ary green value of (b);
RGB 1,B (B) C representing RGB 1,B A C-ary blue value of (b);
RGB 1,B (R) C RGB 1,B (G) C RGB 1,B (B) C representing red values RGB 1,B (R) C Green value RGB 1,B (G) C And blue value RGB 1,B (B) C According to the three-color character strings of the 1 st row and the B th column which are arranged from left to right;
RGB 2,1 (R) C representing RGB 2,1 A C-ary red value of (b);
RGB 2,1 (G) C representing RGB 2,1 A C-ary green value of (b);
RGB 2,1 (B) C representing RGB 2,1 A C-ary blue value of (b);
RGB 2,1 (R) C RGB 2,1 (G) C RGB 2,1 (B) C representing red values RGB 2,1 (R) C Green value RGB 2,1 (G) C And blue value RGB 2,1 (B) C The obtained three-color character strings of the 2 nd row and the 1 st column are arranged from left to right;
RGB 2,2 (R) C representing RGB 2,2 A C-ary red value of (b);
RGB 2,2 (G) C representing RGB 2,2 A C-ary green value of (b);
RGB 2,2 (B) C representing RGB 2,2 A C-ary blue value of (b);
RGB 2,2 (R) C RGB 2,2 (G) C RGB 2,2 (B) C representing red values RGB 2,2 (R) C Green value RGB 2,2 (G) C And blue value RGB 2,2 (B) C The obtained 2 nd row and 2 nd column three-color character strings are arranged from left to right;
RGB 2,3 (R) C representing RGB 2,3 A C-ary red value of (b);
RGB 2,3 (G) C representing RGB 2,3 A C-ary green value of (b);
RGB 2,3 (B) C representing RGB 2,3 A C-ary blue value of (b);
RGB 2,3 (R) C RGB 2,3 (G) C RGB 2,3 (B) C representing red values RGB 2,3 (R) C Green value RGB 2,3 (G) C And blue value RGB 2,3 (B) C According to the obtained three-color character strings of the 2 nd row and the 3 rd column which are arranged from left to right;
RGB 2,B (R) C representing RGB 2,B A C-ary red value of (b);
RGB 2,B (G) C representing RGB 2,B A C-ary green value of (b);
RGB 2,B (B) C representing RGB 2,B A C-ary blue value of (b);
RGB 2,B (R) C RGB 2,B (G) C RGB 2,B (B) C representing red values RGB 2,B (R) C Green value RGB 2,B (G) C And blue value RGB 2,B (B) C According to the obtained three-color character strings of the 2 nd row and the B th column arranged from left to right;
RGB 3,1 (R) C representing RGB 3,1 A C-ary red value of (b);
RGB 3,1 (G) C representing RGB 3,1 A C-ary green value of (b);
RGB 3,1 (B) C representing RGB 3,1 A C-ary blue value of (b);
RGB 3,1 (R) C RGB 3,1 (G) C RGB 3,1 (B) C representing red values RGB 3,1 (R) C Green value RGB 3,1 (G) C And blue value RGB 3,1 (B) C According to the 3 rd row and 1 st column three-color character strings which are arranged from left to right;
RGB 3,2 (R) C representing RGB 3,2 A C-ary red value of (b);
RGB 3,2 (G) C representing RGB 3,2 A C-ary green value of (b);
RGB 3,2 (B) C representing RGB 3,2 A C-ary blue value of (b);
RGB 3,2 (R) C RGB 3,2 (G) C RGB 3,2 (B) C representing red values RGB 3,2 (R) C Green value RGB 3,2 (G) C And blue value RGB 3,2 (B) C According to the 3 rd row and 2 nd column three-color character strings which are arranged from left to right;
RGB 3,3 (R) C representing RGB 3,3 A C-ary red value of (b);
RGB 3,3 (G) C representing RGB 3,3 A C-ary green value of (b);
RGB 3,3 (B) C representing RGB 3,3 A C-ary blue value of (b);
RGB 3,3 (R) C RGB 3,3 (G) C RGB 3,3 (B) C representing red values RGB 3,3 (R) C Green value RGB 3,3 (G) C And blue value RGB 3,3 (B) C According to the 3 rd row and 3 rd column three-color character strings which are arranged from left to right;
RGB 3,B (R) C representing RGB 3,B A C-ary red value of (b);
RGB 3,B (G) C representing RGB 3,B A C-ary green value of (b);
RGB 3,B (B) C representing RGB 3,B A C-ary blue value of (b);
RGB 3,B (R) C RGB 3,B (G) C RGB 3,B (B) C representing red values RGB 3,B (R) C Green value RGB 3,B (G) C And blue value RGB 3,B (B) C According to the 3 rd row and the B th column three-color character strings which are arranged from left to right;
RGB A,1 (R) C representing RGB A,1 A C-ary red value of (b);
RGB A,1 (G) C representation ofRGB A,1 A C-ary green value of (b);
RGB A,1 (B) C representing RGB A,1 A C-ary blue value of (b);
RGB A,1 (R) C RGB A,1 (G) C RGB A,1 (B) C representing red values RGB A,1 (R) C Green value RGB A,1 (G) C And blue value RGB A,1 (B) C The three-color character strings of the A line and the 1 st column are arranged from left to right;
RGB A,2 (R) C representing RGB A,2 A C-ary red value of (b);
RGB A,2 (G) C representing RGB A,2 A C-ary green value of (b);
RGB A,2 (B) C representing RGB A,2 A C-ary blue value of (b);
RGB A,2 (R) C RGB A,2 (G) C RGB A,2 (B) C representing red values RGB A,2 (R) C Green value RGB A,2 (G) C And blue value RGB A,2 (B) C The three-color character strings of the A line and the 2 nd column are arranged from left to right;
RGB A,3 (R) C representing RGB A,3 A C-ary red value of (b);
RGB A,3 (G) C representing RGB A,3 A C-ary green value of (b);
RGB A,3 (B) C representing RGB A,3 A C-ary blue value of (b);
RGB A,3 (R) C RGB A,3 (G) C RGB A,3 (B) C representing red values RGB A,3 (R) C Green value RGB A,3 (G) C And blue value RGB A,3 (B) C The three-color character strings of the A-th row and the 3 rd column are arranged from left to right;
RGB A,B (R) C representing RGB A,B A C-ary red value of (b);
RGB A,B (G) C representing RGB A,B A C-ary green value of (b);
RGB A,B (B) C representing RGB A,B A C-ary blue value of (b);
RGB A,B (R) C RGB A,B (G) C RGB A,B (B) C representing red values RGB A,B (R) C Green value RGB A,B (G) C And blue value RGB A,B (B) C According to the three-color character strings of the A-th row and the B-th column which are arranged from left to right;
if a < a, a=a+1, and the process returns to step S32.
In a preferred embodiment of the present invention, in step S33, RGB is combined a,b The method for converting the red value, the green value and the blue value into D bit numbers comprises the following steps:
s331, if RGB a,b (R)||=D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The next step is executed if the number of bits of the red value is equal to the number of bits of the red value;
if RGB a,b (R)||<D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The number of bits of the red value in (b) is in RGB a,b The left side of (R) supplements D-RGB a,b (R) || identifiers, the identifiers being 0;
s332, if RGB a,b (G)||=D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The next step is executed if the number of bits of the green value in (a);
if RGB a,b (G)||<D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The number of bits of green value in (b) is then in RGB a,b (G) D- ||rgb is supplemented to the left side of (b) a,b (G) The number of identifiers;
S333, if RGB a,b (B)||=D,RGB a,b (B) Watch (watch)RGB display a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b The next step is executed if the number of bits of the blue value is smaller;
if RGB a,b (B)||<D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b In the number of bits of blue value, then in RGB a,b (B) D- ||rgb is supplemented to the left side of (b) a,b (B) The number of identifiers;
or S331, if RGB a,b (R)||=D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The next step is executed if the number of bits of the red value is equal to the number of bits of the red value;
if RGB a,b (R)||<D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The number of bits of the red value in (b) is in RGB a,b The left side of (R) supplements D-RGB a,b (R) || identifiers, the identifiers being 0;
s332, if RGB a,b (B)||=D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b The next step is executed if the number of bits of the blue value is smaller;
if RGB a,b (B)||<D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b In the number of bits of blue value, then in RGB a,b (B) D- ||rgb is supplemented to the left side of (b) a,b (B) The number of identifiers;
s333, if RGB a,b (G)||=D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The next step is executed if the number of bits of the green value in (a);
if RGB a,b (G)||<D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The number of bits of green value in (b) is then in RGB a,b (G) D- ||rgb is supplemented to the left side of (b) a,b (G) The number of identifiers;
or S331, if RGB a,b (G)||=D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The next step is executed if the number of bits of the green value in (a);
if RGB a,b (G)||<D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The number of bits of green value in (b) is then in RGB a,b (G) D- ||rgb is supplemented to the left side of (b) a,b (G) The number of identifiers is 0;
s332, if RGB a,b (B)||=D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b The next step is executed if the number of bits of the blue value is smaller;
if RGB a,b (B)||<D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b In the number of bits of blue value, then in RGB a,b (B) D- ||rgb is supplemented to the left side of (b) a,b (B) The number of identifiers;
s333, if RGB a,b (R)||=D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The next step is executed if the number of bits of the red value is equal to the number of bits of the red value;
if RGB a,b (R)||<D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The number of bits of the red value in (b) is in RGB a,b The left side of (R) supplements D-RGB a,b (R) || identifiers;
or S331, if RGB a,b (G)||=D,RGB a,b (G) Representing RGB a,b Green value in (b) represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The next step is executed if the number of bits of the green value in (a);
if RGB a,b (G)||<D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The number of bits of green value in (b) is then in RGB a,b (G) D- ||rgb is supplemented to the left side of (b) a,b (G) The number of identifiers is 0;
s332, if RGB a,b (R)||=D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The next step is executed if the number of bits of the red value is equal to the number of bits of the red value;
if RGB a,b (R)||<D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The number of bits of the red value in (b) is in RGB a,b The left side of (R) supplements D-RGB a,b (R) || identifiers;
s333, if RGB a,b (B)||=D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b The next step is executed if the number of bits of the blue value is smaller;
If RGB a,b (B)||<D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b In the number of bits of blue value, then in RGB a,b (B) D- ||rgb is supplemented to the left side of (b) a,b (B) The number of identifiers;
or S331, if RGB a,b (B)||=D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b The next step is executed if the number of bits of the blue value is smaller;
if RGB a,b (B)||<D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b In the number of bits of blue value, then in RGB a,b (B) D- ||rgb is supplemented to the left side of (b) a,b (B) The number of identifiers is 0;
s332, if RGB a,b (R)||=D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The next step is executed if the number of bits of the red value is equal to the number of bits of the red value;
if RGB a,b (R)||<D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The number of bits of the red value in (b) is in RGB a,b The left side of (R) supplements D-RGB a,b (R) || identifiers;
s333, if RGB a,b (G)||=D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The next step is executed if the number of bits of the green value in (a);
if RGB a,b (G)||<D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The number of bits of green value in (b) is then in RGB a,b (G) D- ||rgb is supplemented to the left side of (b) a,b (G) The number of identifiers;
or S331, if RGB a,b (B)||=D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b The next step is executed if the number of bits of the blue value is smaller;
if RGB a,b (B)||<D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b In the number of bits of blue value, then in RGB a,b (B) D- ||rgb is supplemented to the left side of (b) a,b (B) The identifiers are0;
S332, if RGB a,b (G)||=D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The next step is executed if the number of bits of the green value in (a);
if RGB a,b (G)||<D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The number of bits of green value in (b) is then in RGB a,b (G) D- ||rgb is supplemented to the left side of (b) a,b (G) The number of identifiers;
s333, if RGB a,b (R)||=D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The next step is executed if the number of bits of the red value is equal to the number of bits of the red value;
if RGB a,b (R)||<D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The number of bits of the red value in (b) is in RGB a,b The left side of (R) supplements D-RGB a,b (R) || identifiers.
Or S331, if RGB a,b (R)||=D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The next step is executed if the number of bits of the red value is equal to the number of bits of the red value;
if RGB a,b (R)||<D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The number of bits of the red value in (b) is in RGB a,b The left side of (R) supplements D-RGB a,b (R) || identifiers, the identifiers being 0;
s332, if RGB a,b (G)||=D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The next step is executed if the number of bits of the green value in (a);
if RGB a,b (G)||<D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The number of bits of green value in (b) is then in RGB a,b (G) D- ||rgb is supplemented to the left side of (b) a,b (G) The number of identifiers;
s333, if RGB a,b (B)||=D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b The next step is executed if the number of bits of the blue value is smaller;
if RGB a,b (B)||<D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b In the number of bits of blue value, then in RGB a,b (B) D- ||rgb is supplemented to the left side of (b) a,b (B) The number of identifiers;
or S331, if RGB a,b (R)||=D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The next step is executed if the number of bits of the red value is equal to the number of bits of the red value;
if RGB a,b (R)||<D,RGB a,b (R) represents RGB a,b The red value of the color, the number of bits of the numerical value is represented by the number of bits, the number of RGB a,b (R) || represents RGB a,b The number of bits of the red value in (b) is in RGB a,b The left side of (R) supplements D-RGB a,b (R) || identifiers, the identifiers being 0;
s332, if RGB a,b (G)||=D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The next step is executed if the number of bits of the green value in (a);
if RGB a,b (G)||<D,RGB a,b (G) Representing RGB a,b Green value in (a), represents the number of bits of the value, RGB a,b (G) The expression RGB a,b The number of bits of green value in (b) is then in RGB a,b (G) Left side supplement of (C)Fill D- ||RGB a,b (G) The number of identifiers;
s333, if RGB a,b (B)||=D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b The next step is executed if the number of bits of the blue value is smaller;
if RGB a,b (B)||<D,RGB a,b (B) Representing RGB a,b The blue value of (b) is the number of bits of the value, and (b) is RGB a,b (B) The expression RGB a,b In the number of bits of blue value, then in RGB a,b (B) D- ||rgb is supplemented to the left side of (b) a,b (B) The number of identifiers;
in a preferred embodiment of the present invention, in step S32, RGB is combined a,b The method for converting the red value, the green value and the blue value into C scale is as follows:
s321, obtaining RGB a,b The number of bits and the number of bits of the red value, the green value and the blue value;
s322, calculating a red first value RGB according to the number of bits and the binary system of the red value, the green value and the blue value obtained in the step S321 a,b (R)| 10 First value of green RGB a,b (G)| 10 And a blue first value RGB a,b (B)| 10 Red first value RGB a,b (R)| 10 First value of green RGB a,b (G)| 10 And a blue first value RGB a,b (B)| 10 The calculation method of (1) is as follows:
wherein RGB a,b (c)| 10 Represents a first value, c= R, G and B, when c is R, RGB a,b (c)| 10 Represents a first red value, and when c is G, RGB a,b (c)| 10 Represents a green first value, and when c is B, RGB a,b (c)| 10 Representing a blue first value;
representing the corresponding red value, green value and blue value according to the 1 st bit value from right to left;
when c is R, the number of the C is R,representing the red value as the value corresponding to bit 1 from right to left; />
When c is a number G, the number G,representing the green value as the value corresponding to bit 1 from right to left;
when c is B, the compound is a compound having a formula (I),representing the blue value as a value corresponding to bit 1 from right to left;
representing the corresponding red value, green value and blue value according to the 2 nd bit value from right to left;
When c is R, the number of the C is R,representing the red value as the value corresponding to bit 2 from right to left;
when c is a number G, the number G,representing the green value as a value corresponding to bit 2 from right to left;
when c is B, the compound is a compound having a formula (I),representing the blue value as a value corresponding to bit 2 from right to left;
representing the corresponding red value, greenThe value and the blue value are according to the value corresponding to the 3 rd bit from right to left;
when c is R, the number of the C is R,representing the red value as the value corresponding to bit 3 from right to left;
when c is a number G, the number G,representing the green value as a value corresponding to bit 3 from right to left;
when c is B, the compound is a compound having a formula (I),representing the blue value as a value corresponding to bit 3 from right to left;
representing corresponding red, green and blue values in terms of right-to-left RGB a,b (c) The value corresponding to the bits; RGB a,b (c) The expression RGB a,b The number of bits of the corresponding red, green and blue values; when c is R, RGB a,b (c) The expression RGB a,b Number of bits of the red value in (b); when c is G, RGB a,b (c) The expression RGB a,b The number of bits of the green value in (a); when c is B, ||RGB a,b (c) The expression RGB a,b The number of bits of the blue value;
when c is R, the number of the C is R,representing red values in terms of right-to-left RGB a,b (c) The value corresponding to the bits;
when c is a number G, the number G,representing green values in terms of right-to-left RGB a,b (c) The value corresponding to the bits;
When c is B, the compound is a compound having a formula (I),representing blue values in terms of right-to-left RGB a,b (c) The value corresponding to the bits;
< c > represents the binary values of the corresponding red, green and blue values; when c is R, < c > represents a binary value of the red value; when c is G, < c > represents a binary value of a green value; c is B, < c > represents a binary value of the blue value;
s323, according to the red first value RGB obtained in the step S322 a,b (R)| 10 First value of green RGB a,b (G)| 10 And a blue first value RGB a,b (B)| 10 Calculating to obtain red second value RGB a,b (R)| C Green second value RGB a,b (G)| C And blue second value RGB a,b (B)| C Red second value RGB a,b (R)| C Green second value RGB a,b (G)| C And blue second value RGB a,b (B)| C The calculation method of (1) comprises the following steps:
s3231, let the initial value E 0 =RGB a,b (c)| 10 Increment a first value e=1; incrementing a second value f=1;
S3232,
wherein E is e Representing the next calculated value; e (E) e-1 Representing the calculated value; c represents a value corresponding to C system;representing a downward rounding; if represents a logical conditional if; e represents the logical sign of the element and the set, belonging to; n represents a set of natural numbers; int () represents an integer part; />Logical symbols representing elements and collections do not belong to;
s3233, judge E e Relationship with C:
if E e C, e=e+1, returning to step S3232; if E e <C-1, executing the next step;
S3234,F f =E f-1 %C,
wherein F is f Representing the value corresponding to the f-th bit from right to left of the second value; e (E) f-1 Representing a replacement value; % represents the remainder portion; c represents a value corresponding to C system;
s3235, judging the relation between f and e:
if f is greater than or equal to E, the second value is E e F e …F 3 F 2 F 1 The method comprises the steps of carrying out a first treatment on the surface of the Wherein E is e Representing the next calculated value; f (F) e Representing a value corresponding to an e-th bit from right to left of the second value; f (F) 3 Representing the value corresponding to the 3 rd bit from right to left of the second value; f (F) 2 Representing the value corresponding to the 2 nd bit from right to left of the second value; f (F) 1 Representing the value corresponding to the 1 st bit from right to left of the second value;
if f < e, f=f+1, returning to step S3234;
for example, RGB is to be used a,b 333333 with the red value of octal is transformed into hexadecimal (c=16):
in the first step, the first step is to provide,
second step, E 0 =112347,e=1,f=1。
Third step, due toThus->Therefore->
Fourth step, due to E 1 =7021+.c=16, so e=e+1=1+1=2.
Fifth step, due toThus->So that/>
Sixth step, due to E 2 =438+.gtoreq.c=16, so e=e+1=2+1=3.
Seventh step, due toThus->So that
Eighth step, due to E 3 =27+.c=16, so e=e+1=3+1=4.
Ninth step, due toThus->So that
Tenth step, due to E 4 =11 < c=16, the next step is performed, at which point E 4 =11,e=4,f=1。
An eleventh step of the method, in which the first step,
twelfth, since f=1 < e=4, f=f+1=1+1=2.
In a thirteenth step, the first step is performed,
fourteenth step, since f=2 < e=4, f=f+1=2+1=3.
In a fifteenth step, the method comprises,
sixteenth step, since f=3 < e=4, f=f+1=3+1=4.
In the seventeenth step, the first step,
eighteenth step, since f=4+.e=4, the next step is performed, where e= 4,F 1 =11,F 2 =13,F 3 =6,F 4 =11,E 4 =1; the corresponding hexadecimal system is F 1 =B,F 2 =D,F 3 =6,F 4 =B,E 4 =1。
Nineteenth step, red second value RGB a,b (R)| 16 Namely E e F e …F 3 F 2 F 1 =E 4 F 4 F 3 F 2 F 1 =1B6DB。
The geographic image importing method comprises the following steps:
s1, constructing two matrices of a '"x B'" which are a first matrix and a second matrix respectively, wherein a '"and B'" can be a '"=b'" =max (a, B), max (,) represents the maximum, or a '"=a, B'" =b, a represents the total number of longitudinal pixels of the image to be derived, a=g picture ×R picture The method comprises the steps of carrying out a first treatment on the surface of the B represents the total number of horizontal pixels of the image to be derived, b=k picture ×R picture ;G picture Representing the height R of the image to be derived picture Representing the resolution, K, of the image to be derived picture Representing the width of the image to be derived;
s2, sequentially dividing the character strings in the character string text into each character string bit number asJ represents the total number of bits of the character string in the character string text;
s3, writing the segmented character strings into a first matrix in sequence from left to right and from top to bottom to obtain a first import matrix;
S4, changing the character strings in the first import matrix into C-system character strings to obtain a C-system first import matrix with the same digits;
s5, taking each character string in the first lead-in matrix as a blue value of the corresponding character string according to the 1 st to D bits from right to left, taking the corresponding character string in the first lead-in matrix as a green value of each character string according to the D+1 to 2D bits from right to left, and taking each character string in the first lead-in matrix as a red value of the corresponding character string according to the 2D+1 to 3D bits from right to left;
taking each character string in the first import matrix as a column number of the corresponding character string according to the 3D+1 to 3D+H bits from right to left, and taking each character string in the first import matrix as a row number of the corresponding character string according to the 3D+H+1 to first bits from right to left;
s6, writing the red value, the green value and the blue value into a second matrix corresponding to the row number and the column number according to the row number and the column number, and obtaining a trichromatic matrix at the moment;
s7, changing the three-color matrix into an image according to the sequence of the three-color matrix.
In the first step, since a '"=b'" =max (a, B) =max (2, 3) =3, two 3×3 matrices, respectively, a first matrix and a second matrix, are constructed.
Secondly, the character string 0HXPOB4p0XbV W6IwcUCmpa13W48FzPS1eU13W5qB6nfbP20lYHOz1k4N050HXqr198SqdV0lYKPuIRSNHr0HXnWg17zhB70lYJ SJDEqgX in the character string text is sequentially divided into each character string bit numberThe following steps:
0HXpoB4p0XbV 13W6IwCUCmpa 13W48FzPS1eU 13W5qB6nfbP2 0lYHOz1k4N05 0HXqr198SqdV 0lYKPuIRSNHr 0HXnWg17zhB7 0lYJ6SJDeqgx
thirdly, writing the segmented character strings into a first matrix in sequence from left to right and from top to bottom to obtain a first import matrix:
step four, changing the character strings in the first import matrix into hexadecimal character strings to obtain a hexadecimal first import matrix with the same digits;
fifthly, taking each character string in the first lead-in matrix as a blue value of the corresponding character string according to the 1 st to 4 (D=4 at the moment) bits from right to left, taking the corresponding character string in the first lead-in matrix as a green value of each character string according to the 5 th to 8 th bits from right to left, and taking each character string in the first lead-in matrix as a red value of the corresponding character string according to the 9 th to 12 th bits from right to left;
taking each character string in the first import matrix as a column number of the corresponding character string according to the 13 th to 16 th (H=4 at the moment) bits from right to left, and taking each character string in the first import matrix as a row number of the corresponding character string according to the 17 th to first bits from right to left;
Sixth, the row number, the column number, the red value, the green value and the blue value are changed into decimal:
seventh, writing the red value, the green value and the blue value into a second matrix corresponding to the row number and the column number according to the row number and the column number, and obtaining a trichromatic matrix at the moment:
eighth, changing the three-color matrix into an image according to the order of the three-color matrix.
The geographic image importing method may further include the following steps:
s1, constructing two matrices of a '"x B'" which are a first matrix and a second matrix respectively, wherein a '"and B'" can be a '"=b'" =max (a, B), max (,) represents the maximum, or a '"=a, B'" =b, a represents the total number of longitudinal pixels of the image to be derived, a=g picture ×R picture The method comprises the steps of carrying out a first treatment on the surface of the B represents the total number of horizontal pixels of the image to be derived, b=k picture ×R picture ;G picture Representing the height R of the image to be derived picture Representing the resolution, K, of the image to be derived picture Representing the width of the image to be derived;
s2, sequentially dividing the character strings in the character string text into each character string bit number asJ represents the total number of bits of the character string in the character string text;
s3, writing the segmented character strings into a first matrix in sequence from left to right and from top to bottom to obtain a first import matrix;
S4, changing the character strings in the first import matrix into C-system character strings to obtain a C-system first import matrix with the same digits;
s5, taking each character string in the first lead-in matrix as a blue value of the corresponding character string according to the 1 st to D bits from right to left, taking the corresponding character string in the first lead-in matrix as a green value of each character string according to the D+1 to 2D bits from right to left, and taking each character string in the first lead-in matrix as a red value of the corresponding character string according to the 2D+1 to 3D bits from right to left;
taking each character string in the first import matrix as a column number of the corresponding character string according to the 3D+1 to 3D+H bits from right to left, and taking each character string in the first import matrix as a row number of the corresponding character string according to the 3D+H+1 to first bits from right to left;
s6, writing the red value, the green value and the blue value into a second matrix corresponding to the row number and the column number according to the row number and the column number, and obtaining a trichromatic matrix at the moment;
s7, adjusting the three-color matrix to obtain a three-color adjustment matrix;
s8, changing the three-color adjustment matrix into an image according to the sequence of the three-color adjustment matrix.
In a preferred embodiment of the invention, the method of adjusting a tristimulus matrix comprises the steps of:
S71, constructing the three-color matrix into an A 'x B' matrix block matrixA ' is a positive integer less than or equal to A, B ' is a positive integer less than or equal to B, A '>1,B′>1, a '×b' =a×b; the number of the three-color row-column character strings in the better matrix block is 2, 3, 4, 9, 16, 25, 36, 49 or 64, and the number of the character strings in each matrix block is equal, so that the row comparison number a "" =1 and the column comparison number b "" =1;
s72, selecting a matrix block K in a matrix block matrix in which the character string of the (a) - (b) - (column) of the three-color matrix is located a″″′,b″″′ A ' is not less than 1 and a ' is not more than 1 and B ' is a positive integer;
s73, judging K a″″′,b″″′ Whether or not in the matrix block set { K 1,1 ,K 1,2 ,K 1,3 ,…,K 1,B′ ,K 2,1 ,K 2,2 ,K 2,3 ,…,K 2,B′ ,K 3,1 ,K 3,2 ,K 3,3 ,…,K 3,B′ ,…,K A′,1 ,K A′,2 ,K A′,3 ,…,K A′,B′ In }:
if K a″″′,b″″′ In the matrix block set, executing the next step;
if K a″″′,b″″′ Not in the matrix block set, step S75 is performed;
s73, calculatingObtain a matrix result block K a″″″,b″″″ If represents the logical condition if,&represents a logic condition and a "represents a row set value, B" represents a column set value, 1.ltoreq.A '.ltoreq.A', 1.ltoreq.B '.ltoreq.B', with A ', B' being a positive integer;
s75, judging K a″″″,b″″″ Logical relationship with the set of matrix blocks:
if K a″″″,b″″″ Belongs to the matrix block set, K is calculated a″″″,b″″″ And K is equal to a″″′,b″″′ Performing position exchange to obtain K a″″″,b″″″ And K a″″′,b″″′ Deleting from the matrix block set, updating the matrix block set, and executing the next step;
if K a″″″,b″″″ If the matrix block set does not belong to the matrix block set, executing the next step;
s74, judging the size relation between a 'and A':
if a 'is not less than A', executing the next step; if a "" < a', a "" =a "" +1, return to step S72;
s75, judging the size relation between B 'and B':
if B ' > B ' is not less than B ', then a tri-color adjustment matrix is obtained:
if B "" < B', B "" =b "" +1, the process returns to step S72.
Similarly, S76 and S77 may be:
s76, judging the size relation between B 'and B':
if B 'is more than or equal to B', executing the next step; if B "" < B', B "" =b "" +1, return to step S72;
s77, judging the size relation between a 'and A':
if a 'is more than or equal to A', a row-column character string adjustment matrix is obtained at the moment:
if a "" < a', a "" =a "" +1, the process returns to step S72.
In a preferred embodiment of the present invention, in step S72, a matrix block K in which the character string of the "b" th row of the three-color matrix is located is selected a″″′,b″″′ The method of (1) is as follows:
wherein,representing an upward rounding; if represents a logical conditional if; e represents the logical sign of the element and the set, belonging to; n represents a set of natural numbers; int () represents an integer part; / >Logical symbols representing elements and collections do not belong to;
while embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the spirit and principles of the invention, the scope of which is defined by the claims and their equivalents.

Claims (1)

1. A geoools tool-based method of repairing geographical data images at too sharp angles, comprising the steps of:
s-1, obtaining geographic data to be processed;
s-2, carrying out acute angle restoration on the geographic data in the step S-1 to obtain restored geographic data; the method for repairing the geographical data by acute angles comprises the following steps:
traversing the vertexes of the geometric figure by using a geokools tool, generating a circle buffered to be one centimeter by the vertexes, considering that two points of intersection of the circle and the original figure are too acute angles if the length is too short, cutting the angle by using a connecting line of the two points of intersection, and removing the too acute angles in the obtained new geometric figure;
s-3, generating a geographic image from the repaired geographic data, performing image export and storage on the generated geographic image, and performing image export on the generated geographic image, wherein the method comprises the following steps of:
S1, acquiring width, height and resolution of an image to be derived, and respectively recording as K picture 、G picture And R is picture ,K picture Representing the width of the image to be derived in cm, G picture Representing the height of the image to be derived in cm, R picture Representing the resolution of the image to be derived; the unit is cm-1, and cm-1 represents the number of pixels per centimeter of resolution unit;
s2, generating a color matrix of the image to be exported according to the width, the height and the resolution of the image to be exported obtained in the step S1, and marking the color matrix as:
wherein RGB 1,1 Color values representing row 1 and column 1 in the image to be derived;
RGB 1,2 color values representing row 1 and column 2 in the image to be derived;
RGB 1,3 representing color values of row 1 and column 3 in the image to be derived;
RGB 1,B color values representing row 1, column B in the image to be derived; b=k picture ×R picture The method comprises the steps of carrying out a first treatment on the surface of the B represents the total number of transverse pixels of the image to be derived, K picture Representing the width of the image to be derived in cm, cm representing the length in cm, R picture Representing the resolution of the image to be derived; the unit is cm-1, and cm-1 represents the number of pixels per centimeter of resolution unit;
RGB 2,1 color values representing row 2 and column 1 in the image to be derived;
RGB 2,2 color values representing row 2 and column 2 in the image to be derived;
RGB 2,3 representing color values of row 2 and column 3 in the image to be derived;
RGB 2,B Color values representing row 2, column B in the image to be derived;
RGB 3,1 color values representing row 3 and column 1 in the image to be derived;
RGB 3,2 color values representing row 3 and column 2 in the image to be derived;
RGB 3,3 representing color values of row 3 and column 3 in the image to be derived;
RGB 3,B a color value representing row 3, column B in the image to be derived;
RGB A,1 color values representing row a, column 1 in the image to be derived; a=g picture ×R picture The method comprises the steps of carrying out a first treatment on the surface of the A represents the total number of longitudinal pixels of an image to be derived, G picture Representing the height of the image to be derived in cm, cm representing the length in cm, R picture Representing the resolution of the image to be derived; the unit is cm-1, and cm-1 represents the number of pixels per centimeter of resolution unit;
RGB A,2 color values representing row a, column 2 in the image to be derived;
RGB A,3 representing color values of row a, column 3 in the image to be derived;
RGB A,B color values representing row a and column B in the image to be derived;
s3, generating a three-color character string matrix according to the color matrix in the step S2;
s4, generating a row-column character string matrix according to the row-column number of the color matrix in the step S2;
s5, generating a row-column three-color character string matrix according to the three-color character string matrix in the step S3 and the row-column character string matrix in the step S4;
s6, converting the three-row character strings in the three-row character string matrix into three-row character strings to obtain a three-row character string matrix;
S7, performing row-column adjustment on character strings in the three-color row-column character string matrix to obtain a row-column character string adjustment matrix;
and S8, writing the character strings in the row-column adjustment character string matrix into the text according to the sequence from left to right and from top to bottom, and obtaining the character string text.
CN202310723905.0A 2023-06-19 2023-06-19 Geographic data image working method for repairing over-acute angle based on geotools Active CN116775786B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310723905.0A CN116775786B (en) 2023-06-19 2023-06-19 Geographic data image working method for repairing over-acute angle based on geotools

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310723905.0A CN116775786B (en) 2023-06-19 2023-06-19 Geographic data image working method for repairing over-acute angle based on geotools

Publications (2)

Publication Number Publication Date
CN116775786A CN116775786A (en) 2023-09-19
CN116775786B true CN116775786B (en) 2024-03-08

Family

ID=87994154

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310723905.0A Active CN116775786B (en) 2023-06-19 2023-06-19 Geographic data image working method for repairing over-acute angle based on geotools

Country Status (1)

Country Link
CN (1) CN116775786B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008225942A (en) * 2007-03-14 2008-09-25 Hitachi Software Eng Co Ltd Farm land block data preparation system
KR101763413B1 (en) * 2016-11-17 2017-08-14 공간정보기술 주식회사 THE Method for GENERALIZING DigitalMap
CN107844574A (en) * 2017-11-06 2018-03-27 山东省国土测绘院 A kind of geographical national conditions census data batch processing system
CN110866082A (en) * 2019-11-26 2020-03-06 南京泛在地理信息产业研究院有限公司 Semantic-assisted CityGML model data geometric consistency detection and restoration method
CN113868202A (en) * 2021-12-06 2021-12-31 深圳市城市交通规划设计研究中心股份有限公司 Method for storing and reading and writing data of geographic file

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008225942A (en) * 2007-03-14 2008-09-25 Hitachi Software Eng Co Ltd Farm land block data preparation system
KR101763413B1 (en) * 2016-11-17 2017-08-14 공간정보기술 주식회사 THE Method for GENERALIZING DigitalMap
CN107844574A (en) * 2017-11-06 2018-03-27 山东省国土测绘院 A kind of geographical national conditions census data batch processing system
CN110866082A (en) * 2019-11-26 2020-03-06 南京泛在地理信息产业研究院有限公司 Semantic-assisted CityGML model data geometric consistency detection and restoration method
CN113868202A (en) * 2021-12-06 2021-12-31 深圳市城市交通规划设计研究中心股份有限公司 Method for storing and reading and writing data of geographic file

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
摄影测量与遥感学;测绘文摘;20090920(03);第31-75页 *
森林防火指挥系统、ArcGIS和Google Earth结合在新一轮退耕还林工程中的应用;阳昭;;内蒙古林业调查设计;20200315(02);88-91 *

Also Published As

Publication number Publication date
CN116775786A (en) 2023-09-19

Similar Documents

Publication Publication Date Title
TWI810393B (en) Distance field color palette
CN112001469B (en) Two-dimensional code encoding method, decoding method and two-dimensional code
CN107563475B (en) Two-dimensional code encoding method and device
Zou et al. A novel image scrambling algorithm based on Sudoku puzzle
CN104268615A (en) Encoding method and decoding method for color two-dimensional code
CN103577861B (en) Bar code structure and bar code encoding method
CN106355545B (en) A kind of processing method and processing device of digital picture geometric transformation
CN116775786B (en) Geographic data image working method for repairing over-acute angle based on geotools
KR20150061743A (en) Display driving apparatus and driving method thereof
CN115760545A (en) Parallel addressing method for texture cache in graphics processor
CN116795939B (en) Method for realizing geographic data restoration based on geotools
CN116842117B (en) Geous image output method based on geotools for repairing self-intersecting
CN116775787B (en) Geographic image derivation method for repairing intersection of outer ring and inner ring based on geotools
CN116775788B (en) Geographic image generation method for repairing intersection of multiple faces in multiple faces based on geotools
CN114360449B (en) Multi-pixel fusion compression method for Mura calibration of display
WO2009110155A1 (en) Puzzle plane generation system and method of generating puzzle plane
CN108182702B (en) Real-time three-dimensional modeling method and system based on depth image acquisition equipment
CN112991516A (en) Texture coding image generation method for three-dimensional reconstruction
CN110728345A (en) Identification code resisting background character interference and generation method thereof
JPS5816189B2 (en) Character pattern generation method
JP4368373B2 (en) Digital information carrier
CN114676805A (en) Two-dimensional code generation method and device
CN107622517B (en) Single-connected arbitrary polygon area filling method and system
CN108510035A (en) A kind of picture Quick Response Code and preparation method thereof based on to Corner Block List Representation color depth difference
CN117057386A (en) Anti-interference square matrix bipartite graph coding and decoding method for commodity outer package

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