CN116775787A - Geographic image derivation method for repairing intersection of outer ring and inner ring based on geotools - Google Patents

Geographic image derivation method for repairing intersection of outer ring and inner ring based on geotools Download PDF

Info

Publication number
CN116775787A
CN116775787A CN202310723907.XA CN202310723907A CN116775787A CN 116775787 A CN116775787 A CN 116775787A CN 202310723907 A CN202310723907 A CN 202310723907A CN 116775787 A CN116775787 A CN 116775787A
Authority
CN
China
Prior art keywords
row
column
rgb
matrix
color
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310723907.XA
Other languages
Chinese (zh)
Other versions
CN116775787B (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 CN202310723907.XA priority Critical patent/CN116775787B/en
Publication of CN116775787A publication Critical patent/CN116775787A/en
Application granted granted Critical
Publication of CN116775787B publication Critical patent/CN116775787B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

The invention provides a geoimage derivation method for repairing intersection of an outer ring and an inner ring based on a geoools tool, which comprises the following steps: s-1, obtaining geographic data to be processed; s-2, repairing the geographic data in the step S-1 by intersecting the outer ring with the inner ring, and obtaining repaired geographic data. The invention can repair the geographic data intersecting the outer ring and the inner ring and ensure the safety of the derived image.

Description

Geographic image derivation method for repairing intersection of outer ring and inner ring based on geotools
Technical Field
The invention relates to the technical field of geographic data, in particular to a geographic image deriving method for repairing intersection of an outer ring and an inner ring based on a geotools.
Background
Polygon self-intersection is a special form of intersection computation and is also a key factor affecting data quality. In general, the self-intersection of the polygons occurs in data operations that cause significant changes in the shapes of the polygons, such as spatial superposition operations, map comprehensive transformation, etc., and although the number of the self-intersection of the polygons is very small in one calculation, the self-intersection of the polygons causes significant topology errors and directly downtime the subsequent map operations, so it is important to efficiently and accurately detect the self-intersection of the polygons and process the self-intersection of the polygons into simple polygons. Patent application number 2020109745212, entitled "a method for identifying and processing a multi-ring polygon self-intersecting pattern", includes obtaining nodes and line segments forming the multi-ring polygon in the multi-ring polygon, and identifying the nodes and line segments in a counterclockwise direction to obtain an outer ring and an inner ring of the multi-ring polygon; calculating the minimum outsourcing rectangle of each line segment, establishing an R tree index, identifying all the minimum outsourcing rectangles which are intersected with the minimum outsourcing rectangle of a certain line segment, forming a plurality of minimum outsourcing rectangle pairs, putting the minimum outsourcing rectangle pairs into a candidate set to be processed of the line segment, and the like. The advantages are that: according to the spatial relationship among the elements forming the self-intersecting mode, refining the mode category of the self-intersecting of the multi-ring polygon, and utilizing the topological and distance relationship among the elements to realize the automatic identification of the self-intersecting modes of different types; and processing various self-intersecting modes of the multi-ring polygons by using a shift and shrink algorithm considering the conflict area and the minimum visible distance constraint, and ensuring that the processing result simultaneously meets the requirements of topology, shape consistency and visual resolution.
Disclosure of Invention
The invention aims at least solving the technical problems in the prior art, and particularly creatively provides a geoimage deriving method for repairing the intersection of an outer ring and an inner ring based on a geotools.
In order to achieve the above object of the present invention, the present invention provides a geoimage deriving method for repairing intersection of an outer ring and an inner ring based on a geotools, comprising the steps of:
s-1, obtaining geographic data to be processed;
s-2, repairing the geographic data in the step S-1 by intersecting the outer ring with the inner ring, and obtaining repaired geographic data.
In a preferred embodiment of the present invention, step S-2 is followed by step S-3 of generating a geographic image from the repaired geographic data and image-deriving the generated geographic image.
In summary, by adopting the technical scheme, the method and the device can repair the geographic data intersecting the outer ring and the inner ring and ensure the safety of the derived image.
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 geoimage derivation method for repairing intersection of an outer ring and an inner ring based on a geotools, which is shown in figure 1 and comprises the following steps:
s-1, obtaining geographic data to be processed;
s-2, repairing the geographic data in the step S-1 by intersecting the outer ring with the inner ring, and obtaining repaired geographic data.
In a preferred embodiment of the present invention, step S-2 is followed by step S-3 of generating a geographic image from the repaired geographic data and image-deriving the generated geographic image.
In a preferred embodiment of the present invention, the method for performing the outer-ring and inner-ring intersection repair on the geographic data in step S-2 is as follows:
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 acute angle repair on the geographic data, where the method for performing acute angle repair on the geographic data includes:
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 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 Connected to … …, the w-th coordinate point data of the q' th plane 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, return 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 Rq″′
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 Representing the q' -th plane coordinate point2 nd coordinate point in data, W 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 the geometric figure with intersection on a plurality of surfaces in the multiple surfaces, a geokools tool can also be used for establishing a buffer with the length of 0 for the geometric figure, and the two intersecting surfaces are consistent with the original geometric figure 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 the width of an image to be exported,Height and resolution, respectively denoted as K picture 、G picture and Rpicture ,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 ,RGB1,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, B includes an integer portion and a fractional portion, the integer portion is taken to be a value +1, i.e., rounded up.
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 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 a positive integer less than or equal to A, B ' is a positive integer less than or equal to 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 ,K1,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′ ' represents an A ' th row and B ' th column matrix block in the row and column character 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 isThe corresponding matrix block matrix is +.>Namely +.>
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 the first step, assume that the width of the image to be derived is 0.15mm, the height is 0.1mm, and the resolution is 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 ,R1 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 the row 2 and column 1 character strings which are arranged from left to right;
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 from leftRightwards arranging the obtained 3 rd row and 2 nd column row character strings;
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 are all D digits,preferably, d=4, then the next step is performed;
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 ,RGB1,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 (red, green and blue) 2,B (G) C Representing RGB 2,B A C-ary green value of (b); RGB (red, green and blue) 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 representing RGB 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) representsRGB 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 (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 (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 (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 number of identifiers is 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 (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- |supplement to the left side of (a)|RGB 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) 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;
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, obtainRGB is taken 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 ,RGBa,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 GRepresenting 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, green value and blue value 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 ,Ee 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 ,Ff 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; wherein ,Ee 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, since f=4.gtoreq.e=4,thus 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 waiting for guidingTotal number of pixels in image longitudinal direction, 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 Ka″″′,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 (9)

1. A geous tool-based method for restoring a geographical image of an intersection of an outer ring and an inner ring, comprising the steps of:
s-1, obtaining geographic data to be processed;
s-2, repairing the geographic data in the step S-1 by intersecting the outer ring with the inner ring, and obtaining repaired geographic data.
2. The geoools tool-based restoration outer ring and inner ring intersection geographic image derivation method according to claim 1, further comprising step S-3 of generating a geographic image from restored geographic data and image deriving the generated geographic image after step S-2.
3. The geoools tool-based restoration outer-ring and inner-ring intersection geographic image derivation method as claimed in claim 1, wherein the method of outer-ring and inner-ring intersection restoration of geographic data in step S-2 is:
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.
4. The geoools tool-based restoration outer ring and inner ring intersection geographic image derivation method as recited in claim 2, wherein the image derivation method for the generated geographic 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 Rpicture ,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 ,RGB1,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 transverse image of the image to be derivedTotal number of elements, 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.
5. The geoools tool-based restoration outer-ring and inner-ring intersection geographic image derivation method according to claim 4, wherein in step S7, the rank string adjustment matrix derivation method includes the steps of:
s71, constructing a three-color row-column character string matrix into an A 'x B' matrix block matrix A 'is a positive integer less than or equal to a, B' is a positive integer less than or equal to B, let row comparison number a "" =1, column comparison number B "" =1;
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:
if B "" < B', B "" =b "" +1, the process returns to step S72.
6. The geoools tool-based restoration of a geographical image derivation method as set forth in claim 5, wherein in step S72, a matrix block K in which the a "row" and b "column three-color line character string of the three-color line 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.
7. The geoools tool-based restoration outer-ring and inner-ring intersection geographic image derivation method according to claim 4, wherein in step S6, the three-color rank string matrix derivation method 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 the a '-th row, b' -th column and row three-color character strings in the row and column three-color character string matrix into an I system, I>C, performing operation; method for converting a row-column three-color character string of an a-th row, a b-th row and a column in a row-column three-color character string matrix into an I-system and RGB a,b The method for converting the red value, the green value and the blue value into C system is the same, but the system value is changed;
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, adding identifiers to the left sides of all rows and columns of character strings in the three-color column row character string matrix if the number of bits of all rows and columns of character strings in the three-color column row character string matrix is not equal to h, so that the number of bits of all rows and columns of character strings in the three-color column row character string matrix is equal to h; at this time, a three-color line character string matrix is obtained.
8. The geoools tool-based restoration outer-ring and inner-ring intersection geographic image derivation method of claim 4, wherein in step S5 the method of generating a matrix of line-three-color strings from the matrix of three-color strings and the matrix of line-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 and column character strings of the a 'row and b' column in the row and column character string matrix, and forming an a 'row and b' column row three-color character string in the row and column three-color character string matrix;
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.
9. The geoools tool-based restoration of a geographical image derivation method for an intersection of an outer ring and an inner ring as set forth in claim 4, wherein in step S4, the method of generating a matrix of row and column strings from the number of rows and columns of the color matrix includes 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 H digits, 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 ,R1 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 the row 2 and column 1 character strings which are arranged from left to right;
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.
CN202310723907.XA 2023-06-19 2023-06-19 Geographic image derivation method for repairing intersection of outer ring and inner ring based on geotools Active CN116775787B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310723907.XA CN116775787B (en) 2023-06-19 2023-06-19 Geographic image derivation method for repairing intersection of outer ring and inner ring based on geotools

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310723907.XA CN116775787B (en) 2023-06-19 2023-06-19 Geographic image derivation method for repairing intersection of outer ring and inner ring based on geotools

Publications (2)

Publication Number Publication Date
CN116775787A true CN116775787A (en) 2023-09-19
CN116775787B CN116775787B (en) 2024-04-05

Family

ID=87992473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310723907.XA Active CN116775787B (en) 2023-06-19 2023-06-19 Geographic image derivation method for repairing intersection of outer ring and inner ring based on geotools

Country Status (1)

Country Link
CN (1) CN116775787B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5923334A (en) * 1996-08-05 1999-07-13 International Business Machines Corporation Polyhedral environment map utilizing a triangular data structure
US8661371B1 (en) * 2012-12-21 2014-02-25 Cadence Design Systems, Inc. Method and apparatus for fixing double patterning color-seeding violations
KR102007610B1 (en) * 2018-10-15 2019-10-21 공간정보기술 주식회사 Distributed versioning tool of spatial information and method for managing distributed version of spatial information using same
US10706484B1 (en) * 2016-06-15 2020-07-07 Resource Environmental Solutions, LLC Methods, systems, and computer readable media for combining pollution source information with geographic and/or temporal information for a land disturbing construction site
CN111428811A (en) * 2020-04-14 2020-07-17 中国测绘科学研究院 Method for recognizing and processing self-intersection pattern of single-ring polygon
CN112053622A (en) * 2020-09-16 2020-12-08 中国测绘科学研究院 Multi-ring polygon self-intersection mode recognition and processing method
CN112131690A (en) * 2020-08-20 2020-12-25 同济大学 Drainage pipe network GIS abnormal data detection and repair method
CN113505510A (en) * 2021-07-13 2021-10-15 四川师范大学 Ecological safety pattern recognition method fusing landscape index and random walk model
US20210342585A1 (en) * 2020-05-01 2021-11-04 Caci, Inc. - Federal Systems and methods for extracting and vectorizing features of satellite imagery
CN114372107A (en) * 2021-12-27 2022-04-19 广东华远国土工程有限公司 GIS-based method and system for visualizing homeland improvement and ecological restoration data
CN115600075A (en) * 2022-12-12 2023-01-13 深圳市城市规划设计研究院有限公司(Cn) Landscape plaque change measuring method and device, electronic equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5923334A (en) * 1996-08-05 1999-07-13 International Business Machines Corporation Polyhedral environment map utilizing a triangular data structure
US8661371B1 (en) * 2012-12-21 2014-02-25 Cadence Design Systems, Inc. Method and apparatus for fixing double patterning color-seeding violations
US10706484B1 (en) * 2016-06-15 2020-07-07 Resource Environmental Solutions, LLC Methods, systems, and computer readable media for combining pollution source information with geographic and/or temporal information for a land disturbing construction site
KR102007610B1 (en) * 2018-10-15 2019-10-21 공간정보기술 주식회사 Distributed versioning tool of spatial information and method for managing distributed version of spatial information using same
CN111428811A (en) * 2020-04-14 2020-07-17 中国测绘科学研究院 Method for recognizing and processing self-intersection pattern of single-ring polygon
US20210342585A1 (en) * 2020-05-01 2021-11-04 Caci, Inc. - Federal Systems and methods for extracting and vectorizing features of satellite imagery
CN112131690A (en) * 2020-08-20 2020-12-25 同济大学 Drainage pipe network GIS abnormal data detection and repair method
CN112053622A (en) * 2020-09-16 2020-12-08 中国测绘科学研究院 Multi-ring polygon self-intersection mode recognition and processing method
CN113505510A (en) * 2021-07-13 2021-10-15 四川师范大学 Ecological safety pattern recognition method fusing landscape index and random walk model
CN114372107A (en) * 2021-12-27 2022-04-19 广东华远国土工程有限公司 GIS-based method and system for visualizing homeland improvement and ecological restoration data
CN115600075A (en) * 2022-12-12 2023-01-13 深圳市城市规划设计研究院有限公司(Cn) Landscape plaque change measuring method and device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
LIANTAO MA 等: ""Estimating Urban Road GPS Environment Friendliness with Bus Trajectories: A City-Scale Approach"", 《SENSORS》, no. 20, 12 March 2020 (2020-03-12) *
曹倩倩 等: ""空间拓扑相交关系计算算法并行化研究"", 《天津理工大学学报》, vol. 32, no. 5, 31 October 2016 (2016-10-31) *
芦军军 等: ""GIS岛多边形三角剖分算法"", 《测绘与空间地理信息》, vol. 39, no. 11, 30 November 2016 (2016-11-30) *

Also Published As

Publication number Publication date
CN116775787B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
JP4624593B2 (en) Document image decoding method
CN112001469B (en) Two-dimensional code encoding method, decoding method and two-dimensional code
CN102622599B (en) Use the data output-input method of some coding
CN107563475B (en) Two-dimensional code encoding method and device
JPH09134157A (en) Hinting method and font file constituting method
CN103838829B (en) Raster vectorization system based on hierarchical boundary-topology search model
CN107292936B (en) Chinese character font vectorization method
CN107578078B (en) Non-mirror symmetry two-dimensional code mark graph verification and layout method for monocular vision positioning
CN107103225A (en) A kind of method for generating graphical verification code
CN105512235A (en) GIS and AutoCAD data exchange method and intermediate file
CN116775787B (en) Geographic image derivation method for repairing intersection of outer ring and inner ring based on geotools
CN116775786B (en) Geographic data image working method for repairing over-acute angle based on geotools
CN116842117B (en) Geous image output method based on geotools for repairing self-intersecting
CN116795939B (en) Method for realizing geographic data restoration based on geotools
CN116775788B (en) Geographic image generation method for repairing intersection of multiple faces in multiple faces based on geotools
JP4381454B2 (en) Puzzle plane generation system and puzzle plane generation method
CN115952252B (en) Semantic tile data processing method and device based on dynamic rendering and electronic equipment
CN117057385A (en) Anti-interference color lattice information encoding and decoding method for commodity outer package
JP3635374B1 (en) Digital information carrier
CN110728345B (en) Identification code resisting background character interference and generation method thereof
CN112991516A (en) Texture coding image generation method for three-dimensional reconstruction
CN114676805A (en) Two-dimensional code generation method and device
CN113919384B (en) Encryption gray-scale image coding and decoding method for commodity outer package
CN116580129B (en) Method, device and storage medium for improving calligraphy character skeleton based on distance transformation
CN107622517B (en) Single-connected arbitrary polygon area filling method and system

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