CN114511614A - Elliptical seal generation method, device, equipment and medium - Google Patents

Elliptical seal generation method, device, equipment and medium Download PDF

Info

Publication number
CN114511614A
CN114511614A CN202111294673.9A CN202111294673A CN114511614A CN 114511614 A CN114511614 A CN 114511614A CN 202111294673 A CN202111294673 A CN 202111294673A CN 114511614 A CN114511614 A CN 114511614A
Authority
CN
China
Prior art keywords
target
character
angle
determining
ellipse
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111294673.9A
Other languages
Chinese (zh)
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.)
Taikang Insurance Group Co Ltd
Taikang Online Property Insurance Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Taikang Online Property Insurance Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taikang Insurance Group Co Ltd, Taikang Online Property Insurance Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN202111294673.9A priority Critical patent/CN114511614A/en
Publication of CN114511614A publication Critical patent/CN114511614A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The invention discloses an elliptical seal generation method, device, equipment and medium.

Description

Elliptical seal generation method, device, equipment and medium
Technical Field
The invention relates to the technical field of Optical Character Recognition (OCR) of a seal image, in particular to an elliptical seal generation method, device, equipment and medium.
Background
In recent years, with the improvement of living standard, the medical level is more advanced, and the purchase demand of medical insurance is more and more. Meanwhile, more insurance claims appear, in the process of insurance claims, clients need to upload image data of various charging invoices, and insurance companies conduct examination based on the image data uploaded by the clients.
In the prior art, insurance companies generally adopt a seal character recognition model which is trained in advance to recognize arc-shaped characters on an elliptical seal on an invoice, so that a large number of elliptical seal samples are required to train the seal character recognition model before the characters on the elliptical seal are recognized based on the seal character recognition model which is trained in advance. However, due to the fact that the invoices are multiple and disordered, one invoice usually covers a lot of information, and if the invoice is directly determined to be an elliptical seal sample, training of a seal character recognition model can be influenced, and accuracy of seal character recognition is further influenced.
Disclosure of Invention
The invention provides an elliptical seal generation method, device, equipment and medium, which are used for solving the problem that in the prior art, if an invoice is directly determined as an elliptical seal sample, training of a seal character recognition model is influenced, and further the accuracy of seal character recognition is influenced.
In a first aspect, the present invention provides a method for generating an elliptical seal, where the method includes:
drawing an arc ellipse by using a four-center method according to the preset ellipse major axis length and ellipse minor axis length;
determining first position information of each target character on the circular arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information;
and for each target character, determining a target central angle corresponding to the target character on a target circular arc on the circular arc ellipse according to the first position information of the target character, determining a target centrifugal angle corresponding to the target central angle according to a corresponding relation between the central angle and the centrifugal angle which are stored in advance, determining second position information of the target character on the target elliptical seal according to the target centrifugal angle and a parameter equation of the ellipse which is stored in advance, and performing angle rotation on the target character according to the second position information.
Further, the determining the first position information of each target character on the arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information includes:
according to the target angle distribution range, determining a first central angle of a first target character at a preset first position on a first circular arc of the circular arc ellipse, determining a first angle between first position information of the first target character on the circular arc ellipse and a first preset straight line of the first circular arc according to the first central angle, and determining first position information of the first target character on the circular arc ellipse according to a parameter equation of the first angle corresponding to the first circular arc which is saved in advance.
Further, the determining the first position information of each target character on the arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information includes:
determining radian intervals between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters; and determining first position information of a second target character according to the radian interval and the first central angle corresponding to the previous target character.
Further, the determining the radian interval between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters comprises:
determining at least one circular arc on a circular arc ellipse corresponding to the target distribution range according to the target angle distribution range corresponding to the text information and the corresponding relation between the pre-stored distribution range and the circular arc;
determining the target arc length of the text information on the arc ellipse according to the first sum of the radians of the at least one arc;
and determining the radian interval between every two adjacent target characters according to the target arc length and the first quotient of the target number of the target characters.
Further, the determining, according to the target angle distribution range, a first central angle of the first target character at the preset first position on the first arc of the arc ellipse includes:
determining a first angle corresponding to the target angle distribution range according to the target angle distribution range;
and determining a second quotient of the first angle and a preset first numerical value, determining a second sum of the second quotient and the preset second numerical value, and determining a first central angle, corresponding to the first target character at the preset first position, on a first arc of the arc ellipse.
Further, the determining the first position information of each target character on the arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information includes:
determining the angle interval between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters;
and aiming at each target character, determining first position information of the target character according to the angle interval and a first central angle corresponding to a previous target character adjacent to the target character.
Further, the determining the angle interval between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters includes:
and determining the angle interval between every two adjacent target characters according to the third quotient of the target angle distribution range corresponding to the character information and the target number of the target characters.
In a second aspect, the present invention further provides an elliptical stamp generating apparatus, including:
the drawing module is used for drawing the circular arc ellipse by utilizing a four-center method according to the preset ellipse major axis length and the ellipse minor axis length;
the determining module is used for determining first position information of each target character on the circular arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information; and for each target character, determining a target central angle corresponding to the target character on a target circular arc on the circular arc ellipse according to the first position information of the target character, determining a target centrifugal angle corresponding to the target central angle according to a corresponding relation between a central angle and a centrifugal angle which are stored in advance, determining second position information of the target character on a target elliptical seal according to the target centrifugal angle and a parameter equation of the ellipse which is stored in advance, and performing angle rotation on the target character according to the second position information.
Further, the determining module is specifically configured to determine, according to the target angle distribution range, a first central angle, corresponding to a first target character at a preset first position, on a first arc of the arc ellipse, determine, according to the first central angle, a first angle between first position information of the first target character on the arc ellipse and a first preset straight line of the first arc, and determine, according to a parameter equation corresponding to the first angle and the first arc that is stored in advance, first position information of the first target character on the arc ellipse.
Further, the determining module is specifically configured to determine the radian interval between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters; and determining first position information of a second target character according to the radian interval and the first central angle corresponding to the previous target character.
Further, the determining module is specifically configured to determine, according to a target angular distribution range corresponding to the text information and a correspondence between a distribution range and an arc that is stored in advance, at least one arc on an arc ellipse corresponding to the target distribution range; determining the target arc length of the text information on the arc ellipse according to the first sum of the radians of the at least one arc; and determining the radian interval between every two adjacent target characters according to the target arc length and the first quotient of the target number of the target characters.
Further, the determining module is specifically configured to determine, according to the target angle distribution range, a first angle corresponding to the target angle distribution range; and determining a second quotient of the first angle and a preset first numerical value, determining a second sum of the second quotient and the preset second numerical value, and determining a first central angle corresponding to a first target character at a preset first position on a first arc of the arc ellipse.
Further, the determining module is specifically configured to determine an angle interval between every two adjacent target characters according to a target angle distribution range corresponding to the character information and the target number of the target characters; and aiming at each target character, determining first position information of the target character according to the angle interval and a first central angle corresponding to a previous target character adjacent to the target character.
Further, the determining module is specifically configured to determine an angle interval between every two adjacent target texts according to a target angle distribution range corresponding to the text information and a third quotient of the target number of the target texts.
In a third aspect, the present invention further provides an electronic device, where the electronic device at least includes a processor and a memory, and the processor is configured to implement the steps of the elliptical seal generation method according to any one of the above descriptions when executing a computer program stored in the memory.
In a fourth aspect, the present invention further provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the steps of any one of the elliptical seal generation methods described above.
In the embodiment of the invention, according to the preset ellipse major axis length and ellipse minor axis length, a circular arc ellipse is drawn by using a four-center method; determining first position information of each target character on the circular arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information; and for each target character, determining a target central angle corresponding to the target character on a target circular arc on the circular arc ellipse according to the first position information of the target character, determining a target centrifugal angle corresponding to the target central angle according to a corresponding relation between a central angle and a centrifugal angle which are stored in advance, determining second position information of the target character on a target elliptical seal according to the target centrifugal angle and a parameter equation of the ellipse which is stored in advance, and performing angle rotation on the target character according to the second position information. According to the method and the device, the second position information of each target character on the target elliptical stamp can be determined based on the first position information corresponding to each target character on the arc ellipse drawn by the four-heart method, and the target character is subjected to angle rotation according to the second position information, so that an elliptical stamp sample can be generated, and the stamp character model identification accuracy is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic process diagram of an elliptical seal generation method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a display for determining arc intervals according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a method for drawing an arc ellipse by a quad-centric approach according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a display for determining a pre-stored relationship between an eccentric angle and a central angle according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a display of a target elliptical stamp according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an apparatus for generating an elliptical stamp according to some embodiments of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to some embodiments of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to improve the accuracy of identifying the characters of the seal by the character model of the seal, the embodiment of the invention provides an elliptical seal generation method, a device, equipment and a medium.
Example 1:
fig. 1 is a schematic process diagram of an elliptical seal generation method provided in an embodiment of the present invention, where the process includes the following steps:
s101: and drawing the arc ellipse by using a four-center method according to the preset ellipse major axis length and ellipse minor axis length.
The method for generating the elliptical seal provided by the embodiment of the invention is applied to electronic equipment, and the electronic equipment can be intelligent terminals, PCs or servers and other equipment.
In the embodiment of the present invention, in order to generate the target elliptical stamp, and further serve as an elliptical stamp sample, an arc ellipse may be drawn by using a four-center method according to a preset ellipse major axis length and an ellipse minor axis length, where the preset ellipse major axis length and the preset ellipse minor axis length are respectively an ellipse major axis and an ellipse minor axis corresponding to the target elliptical stamp. The arc ellipse drawn by the four-center method and the target ellipse corresponding to the target elliptical stamp have eight common intersection points, and for every two adjacent common intersection points, the radian formed between the two common intersection points on the arc ellipse is different from the radian formed between the two common intersection points on the target ellipse corresponding to the target elliptical stamp, but is very close to the radian formed between the two common intersection points on the arc ellipse.
Specifically, the process of drawing the circular arc ellipse by using the four-center method according to the preset ellipse major axis length and the ellipse minor axis length is the prior art, and is not described herein again.
S102: and determining first position information of each target character on the circular arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information.
In the embodiment of the present invention, in order to determine the position information of the text to be typeset on the target elliptical stamp, first position information of the target text on the circular arc ellipse included in the text information to be typeset may be determined, specifically, the first position information of each target text on the circular arc ellipse may be determined according to the target number of the target text included in the text information to be typeset and the target angle distribution range corresponding to the text information, where the target text included in the text information to be typeset may be a full name of a certain organization or a certain organization, and the like. In general, for the purpose of the artistic layout of characters, if the number of the target characters included in the character information is larger, the corresponding target angle range is also larger, and specifically, the target angle range is set according to actual requirements. The first position information may be coordinate information or angle information. In the embodiment of the present invention, the coordinate system is predetermined, and specifically, in the process of determining the coordinate system, the center of the circular arc ellipse is taken as the origin of coordinates, the straight line where the long axis of the circular arc ellipse is located is taken as the x axis of the coordinate system, and the straight line where the short axis of the circular arc ellipse is located is taken as y to establish the coordinate system.
S103: and for each target character, determining a target central angle corresponding to the target character on a target circular arc on the circular arc ellipse according to the first position information of the target character, determining a target centrifugal angle corresponding to the target central angle according to a corresponding relation between a pre-stored circular center angle and a pre-stored centrifugal angle, determining second position information of the target character on a target elliptical seal according to the target centrifugal angle and a pre-stored parameter equation of the ellipse, and performing angle rotation on the target character according to the second position information.
In order to determine the position information of each target character on the target elliptical stamp, that is, to determine the second position information, in the embodiment of the present invention, for each target character, according to the first position information of the target character on the circular arc ellipse, the target central angle corresponding to the target character on the target circular arc on the circular arc ellipse is determined, specifically, according to the first position information of the target character on the circular arc ellipse
Figure BDA0003336101250000081
Wherein, the alpha is the target central angle, the y1Is the y-axis coordinate in the first position information, the x1Is the x-axis coordinate in the first position information. And the target central angle corresponding to the target character on the target arc on the arc ellipse is the first position information of the target character on the arc ellipse, the coordinate system origin and the included angle corresponding to the positive direction of the x axis. In the process of drawing the circular arc ellipse based on the four-center method, the circular arc ellipse is composed of four different circular partial circular arcs drawn respectively at different circle centers and different radiuses, the target circular arc of each target character corresponds to one of the four circular arcs, and specifically, the target circular arc of each target character is determined according to the central angle corresponding to the previous target character and the radian interval between every two adjacent target characters.
In order to determine the second position information of the target character on the target elliptical stamp, the corresponding relation between the central angle corresponding to the target arc of the target character on the arc ellipse and the centrifugal angle of the target character on the arc ellipse is preserved in advance, and the target centrifugal angle corresponding to the target central angle is determined according to the corresponding relation between the central angle and the centrifugal angle preserved in advance. Because the arc ellipse is close to the target ellipse corresponding to the target ellipse seal, the target centrifugal angle corresponding to the target ellipse of the target character on the arc ellipse can be determined as the target centrifugal angle corresponding to the target character on the target ellipse corresponding to the target ellipse seal. And determining second position information of the target character on the target elliptical seal according to the target centrifugal angle and a parameter equation of a prestored ellipse, wherein a process of determining the second position information of the target character on the target elliptical seal according to the target centrifugal angle and the parameter equation of the prestored ellipse is prior art and is not repeated herein.
After the second position information is determined, the target character is angularly rotated according to the second position information, specifically, a target slope of the target character at the second position information may be determined according to the second position information and a tangent parameter equation stored in advance, and the target character is rotated along the direction of the target slope. The process of determining the target slope according to the second position information and the tangent equation stored in advance is the prior art, and is not described herein again.
According to the embodiment of the invention, the second position information of each target character on the target elliptical stamp can be determined based on the first position information corresponding to each target character on the arc ellipse drawn by the four-heart method, and the target character is subjected to angle rotation according to the second position information, so that an elliptical stamp sample can be generated, and the stamp character recognition accuracy of the stamp character model is improved.
Example 2:
in order to determine the first position information of each target character on the circular arc ellipse, on the basis of the above embodiment, in an embodiment of the present invention, the determining the first position information of each target character on the circular arc ellipse according to the target number of the target characters included in the character information to be typeset and the target angle distribution range corresponding to the character information includes:
according to the target angle distribution range, a first central angle corresponding to a first target character at a preset first position on a first circular arc of the circular arc ellipse is determined, according to the first central angle, a first angle between first position information of the first target character on the circular arc ellipse and a first preset straight line of the first circular arc is determined, and according to a parameter equation corresponding to the first angle and the first circular arc which is saved in advance, first position information of the first target character on the circular arc ellipse is determined.
In the embodiment of the present invention, since the target angle distribution range is known and the distribution rule of the target characters is determined, for example, the target characters are sequentially typeset with the y-axis of the coordinate system as the symmetry axis, according to the target angle distribution range, a first central angle corresponding to a first target character at a preset first position on a first circular arc on the circular arc ellipse can be determined, where the preset first position is the position information of the rightmost target character on the circular arc ellipse, or the position information of the leftmost target character on the ellipse on the circular arc ellipse, and the rightmost target character or the leftmost target character is the first target character, in general, the rightmost character is the first character in the target characters included in the character information to be typeset, the leftmost character is the last character in the target characters contained in the character information to be typeset.
If the text information is a "literature community", the first target text is a "text" or a "group", and the preset first position is position information that the "text" is located on the circular arc ellipse, or may be position information that the "group" is located on the circular arc ellipse. The preset first position is configured in advance, specifically, the preset first position is related to a target angle distribution range, and if the target angle distribution range is determined, the preset first position is also determined. And a first central angle of the first target character corresponding to a first arc on the arc ellipse is an angle formed by the target character, the origin of coordinates and the positive direction of the x axis of the coordinate system.
In order to determine the first position information of the first target character on the arc ellipse, in an embodiment of the present invention, after a first central angle is determined, according to the first central angle, a first angle between the first position information of the first target character on the arc ellipse and a first preset straight line of a first arc of the first target character on the arc ellipse is determined, where the first preset straight line may be a connecting line between an intersection point between the first arc and another adjacent arc and a center corresponding to the first arc, and the first preset straight line may also be a connecting line between a midpoint of the first arc and a center of the ellipse.
Since the first position information of the first target character on the arc ellipse is located on the first arc, in an embodiment of the present invention, in order to determine the first position information of the first target character on the arc ellipse, after determining a first angle between the first position information of the first target character on the arc ellipse and a first preset straight line of the first arc, the first position information of the first target character on the arc ellipse is determined according to a parameter equation corresponding to the first angle and the first arc that is saved in advance, and specifically, the first position information of the first target character on the arc ellipse is determined according to the first angle, the radius of the first arc and a parameter equation of a circle corresponding to the first arc.
In order to determine the first position information of each target character on the circular arc ellipse, on the basis of the foregoing embodiments, in an embodiment of the present invention, the determining the first position information of each target character on the circular arc ellipse according to the target number of the target characters included in the character information to be typeset and the target angle distribution range corresponding to the character information includes:
determining radian intervals between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters; and determining first position information of a second target character according to the radian interval and the first central angle corresponding to the previous target character.
In the embodiment of the invention, each target character can be typeset with equal arc length, that is, each target character can be typeset on the target elliptical seal sequentially according to the clockwise direction with equal arc length. Specifically, firstly, according to the target angle distribution range corresponding to the character information and the target number of the target characters, the radian interval between every two adjacent target characters is determined, and according to the radian interval and the first central angle corresponding to the previous target character, the first position information of the second target character is determined, specifically, because the two adjacent target characters may be on different target circular arcs and may also be on the same target circular arc, in order to determine the position information of each target character on the circular arc ellipse, firstly, whether each two adjacent target characters are on the same target circular arc is determined, because after the first position information of the first target character is determined, the first position information of other target characters after the first target character can be sequentially determined, and the principle of determining the first position information of each other target character is the same, for convenience of description, a target character, of the other target characters, for which the first position information is to be currently determined is referred to as a second target character, and a target character adjacent to the second target character and for which the first position information has been determined is referred to as a previous target character.
Specifically, an included angle between a preset second straight line of a target arc corresponding to a previous target character and the previous target character is determined according to a first central angle corresponding to the previous target character, a first radian between the preset second straight line of the target arc corresponding to the previous target character and first position information where the previous target character is located is determined according to the included angle and a first radius of the target arc corresponding to the previous target character, and specifically, a product of the included angle and the first radius is determined as the first radian. The preset second straight line of the target arc corresponding to the previous target character is a connection line between the last point of the target arc corresponding to the previous target character and the circle center corresponding to the target arc corresponding to the previous target character in the clockwise direction, that is, the preset second straight line of the target arc corresponding to the previous target character is a connection line between the intersection point of the arc adjacent to the target arc corresponding to the previous target character in the clockwise direction and the circle center corresponding to the target arc corresponding to the previous target character.
After the first radian is determined, in order to determine whether the previous target character and the second target character are on the same target arc, whether the first radian is larger than an arc interval between every two adjacent target characters is determined, if yes, a second target character which is adjacent to the first target character and is spaced by the radian interval is on one target arc, the first angle interval between the previous target character and the second target character can be determined according to the radian interval and a third quotient value of a first radius of the target arc corresponding to the previous target character, and a parameter equation of the target arc corresponding to the previous target character (second target character) is determined according to the first angle interval and the first radius of the target arc where the previous target character (second target character) is located, first position information of the second target character is determined. Specifically, the process of determining the first position information of the second target character according to the first angle interval, the first radius of the target arc where the previous target character (the second target character) is located, and the parameter equation of the target arc corresponding to the previous target character (the second target character) is the prior art, and is not described herein again.
If the first radian is not larger than the radian interval, the second target character and the previous target character are not positioned on the same target arc, for convenience of description, the arc where the previous target character is positioned is referred to as a first target arc, and the arc where the second target character is positioned is referred to as a second target arc. In order to determine the first position information of the second target character, in an embodiment of the present invention, a difference between a radian interval between every two adjacent target characters and the first radian is determined, a fourth quotient of the difference and a second radius corresponding to the second target arc is determined, and the fourth quotient is determined as a second angle interval of a preset third straight line of the second target character and the second target arc, where the preset third straight line is a connection line between a first point of the second target arc in the clockwise direction and a center of a circle corresponding to the second target arc. The process of determining the first position information of the second target character according to the second angle interval, the second radius corresponding to the second target circular arc, and the parameter equation corresponding to the second circular arc is the prior art, and is not described herein again.
Example 3:
in order to determine the radian interval between each two adjacent target characters, on the basis of the foregoing embodiments, in an embodiment of the present invention, the determining the radian interval between each two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters includes:
determining at least one circular arc on a circular arc ellipse corresponding to the target distribution range according to the target angle distribution range corresponding to the text information and the corresponding relation between the pre-stored distribution range and the circular arc;
determining the target arc length of the text information on the arc ellipse according to the first sum of the radians of the at least one arc;
and determining the radian interval between every two adjacent target characters according to the target arc length and the first quotient of the target number of the target characters.
In order to reduce the workload of the electronic device, the electronic device may determine the corresponding target arc length in a certain target angular distribution range based on the four known arcs. Specifically, the electronic device prestores a corresponding relationship between the distribution range and the circular arc, and may determine at least one circular arc on the circular arc ellipse corresponding to the target distribution range according to the target angle distribution range corresponding to the text information and the corresponding relationship between the prestored distribution range and the circular arc, and determine the target arc length of the text information on the circular arc ellipse according to the first sum of the radians of the at least one circular arc. In order to determine the radian interval between every two adjacent target characters, in an embodiment of the present invention, a first quotient of the target arc length and the target number of the target characters is determined, where the first quotient is the radian interval between every two adjacent target characters. The first quotient of the target arc length and the target number of the target characters is obtained by dividing the target arc length by the target number of the target characters, that is, the first quotient is equal to the target arc length divided by the target number of the target characters.
Fig. 2 is a schematic diagram of a display for determining an arc interval according to an embodiment of the present invention, and the description will be given with reference to fig. 2.
Point G is the point of symmetry of point H about line AB. If the target angle distribution range corresponding to the character information to be typeset is ≈ ROS, if the target characters are typeset by taking CD as a symmetry axis, the elliptical arc length RS is equal to two times of the elliptical arc length RC. When the starting point R of the characters is on the arc DK, the target circular arc RC corresponding to the target angle distribution range is approximately equal to the sum of the lengths of three circular arcs such as the arc RK on the circle O4, the arc KH on the circle O1 and the arc HC on the circle O2, and when the starting point R is on the arc HK, the target circular arc RC corresponding to the target angle distribution range is approximately equal to the sum of the lengths of two circular arcs such as the arc RH on the circle O1 and the arc HC on the circle O2; when the point R is on the arc HC, the target arc RC corresponding to the target angular distribution range at this time is approximately equal to the length of the arc HC on the circle O2.
After the target circular arc is determined, the radian interval between every two adjacent target characters is determined according to the target circular arc and the first quotient value of the target number of the target characters.
Example 4:
in order to determine a first central angle, corresponding to the first target character at the preset first position, on the first arc of the arc ellipse, in an embodiment of the present invention based on the above embodiments, the determining, according to the target angle distribution range, a first central angle, corresponding to the first target character at the preset first position, on the first arc of the arc ellipse includes:
determining a first angle corresponding to the target angle distribution range according to the target angle distribution range;
and determining a second quotient of the first angle and a preset first numerical value, determining a second sum of the second quotient and the preset second numerical value, and determining a first central angle, corresponding to the first target character at the preset first position, on a first arc of the arc ellipse.
Since the target characters included in the character information are sequentially arranged by taking the short axis of the ellipse as the symmetry axis, a first angle corresponding to the target angle distribution range can be determined according to the target angle distribution range, and then a second quotient of the first angle and a preset first numerical value is determined, wherein the preset first numerical value is 2, and the second quotient is an angle corresponding to a half target angle distribution range, namely an angle between a connecting line of the rightmost target character and the center of the ellipse and the positive half axis of the y-axis. After the second quotient value is determined, a second sum of the second quotient value and a preset second numerical value is determined, wherein the preset second numerical value is 90 degrees, and the second sum is a first central angle of the first target character at the preset first position corresponding to the first circular arc of the circular arc ellipse, namely a first central angle of the target character at the rightmost side corresponding to the first circular arc of the circular arc ellipse.
Fig. 3 is a schematic diagram of a display for drawing a circular arc ellipse by using a quadcentric method according to an embodiment of the present invention, and the description will be given with reference to fig. 3.
If the major axis of the preset ellipse is AB, the minor axis is CD, and O is the center point of the ellipse. Firstly, connecting a line segment AC, drawing a circle by taking O as a center of the circle and the length of OA as a radius, intersecting a CD line at a point E, then drawing a circle by taking C as a center of the circle and the length of CE as a radius, intersecting an AC line at a point F, then drawing a circle by taking A as a center of the circle and the length of AF as a radius, drawing a circle by taking F as a center of the circle and the length of AF as a radius, connecting the intersection point of two arcs as a vertical bisector of AF, intersecting AF at G, intersecting AB axis at a point O1, intersecting CD axis at a point O2, taking O as a center of the circle, drawing a circle by taking the length of OO1 as a radius, and intersecting OB at a point O3; the circle is drawn by taking O as the center and the length of OO2 as the radius, and intersects OB at O4 point.
After O1, O2, O3, and O4 are determined, a circle is drawn with the center at O1, the length at O1A as a radius, the center at O2, the length at O2C as a radius, the center at O3, the center at O3B as a radius, the center at O4, and the length at O4D as a radius, respectively. Then, four segments of circular arcs connecting four points of the ACBD are approximate ellipses, that is, circular arc ellipses.
After determining the arcs corresponding to the circle O1, the circle O2, the circle O3 and the circle O4, the center and the radius of each circle are calculated, and the distance from the point A to the straight line O1O2 is calculated
Figure BDA0003336101250000151
Wherein
Figure BDA0003336101250000152
Since the line AC is perpendicular to the line O1O2,
Figure BDA0003336101250000153
the circle O1 is thus obtained with a radius O1A of length
Figure BDA0003336101250000154
The radius of the circle O1 is AO-AO 1.
Similarly, the respective corresponding radii and centers of the circle O2, the circle O3, and the circle O4 may also be determined, which is not described herein.
Fig. 4 is a schematic diagram illustrating a display for determining a pre-stored correspondence relationship between an eccentric angle and a central angle according to an embodiment of the present invention, and the description will be given with reference to fig. 4.
Drawing a circle by taking the O as the center of the circle and the length of the OA as the radius, and calling the circle as a great circle A; drawing a circle by taking the O as the center of the circle and the length of the OC as the radius, and calling the circle as a small circle C; draw an ellipse with O as the center point, AB as the major axis and CD as the minor axisA circle, called ellipse O. Supposing that any point P exists on the great circle A, making PN on the passing point P to be vertical to the point N, and intersecting the point P with an ellipse at the point M; connect OP intersection circle C at point Q. The PON is called the elliptical centrifugal angle, and according to the parameter equation of the ellipse, the coordinate of the M point can be expressed as
Figure BDA0003336101250000161
The slope of the tangent line at the point of intersection M is
Figure BDA0003336101250000162
Given a point P, the corresponding relationship between the eccentricity angle and the central angle is thus
Figure BDA0003336101250000163
Wherein CD is the preset ellipse minor axis length, and AB is the preset ellipse major axis length.
For example,
Figure BDA0003336101250000164
corresponding angle of eccentricity
Figure BDA0003336101250000165
According to the ellipse parametric equation, the coordinates of R are
Figure BDA0003336101250000166
∠A01The arc RA corresponding to R has a length of
Figure BDA0003336101250000167
The length of arc AH of
Figure BDA0003336101250000168
The length of the arc HC is
Figure BDA0003336101250000169
Assuming that the target number of the target characters to be typeset is N, the radian interval between every two adjacent target characters is
Figure BDA00033361012500001610
Fig. 5 is a schematic display diagram of a target elliptical stamp according to an embodiment of the present invention, and the description will be given with reference to fig. 5.
If the text information is 'Hubei Wuhan City cooperative hospital', the 'lake', 'North', 'Wu', 'Han', 'City', 'Co', 'He', 'medical' and 'Hospital' are sequentially arranged by taking the short axis of the ellipse as the symmetry axis, and the radian intervals between every two adjacent target texts are the same.
Example 5:
in order to determine the first position information of each target character on the circular arc ellipse, on the basis of the above embodiments, in an embodiment of the present invention, the determining the first position information of each target character on the circular arc ellipse according to the target number of the target characters included in the character information to be typeset and the target angle distribution range corresponding to the character information includes:
determining the angle interval between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters;
and aiming at each target character, determining first position information of the target character according to the angle interval and a first central angle corresponding to a previous target character adjacent to the target character.
In the embodiment of the invention, besides the typesetting of each target character with equal radian, the typesetting of each target character can also be carried out with equal angle, that is, each target character can be typeset on the target elliptical seal sequentially according to the clockwise direction with equal angle. Specifically, according to a target angle distribution range corresponding to the text information and a target number of the target text, an angle interval between every two adjacent target text is determined, and then for each target text, first position information of the target text is determined according to the angle interval and a first central angle corresponding to a previous target text adjacent to the target text.
Specifically, since the two adjacent target characters may be on different target circular arcs or the same target circular arc, in order to determine the position information of each target character on the circular arc ellipse, it is first determined whether each two adjacent target characters are on the same target circular arc, for convenience of description, a target character currently determining the first position information is referred to as a third target character, and a previous target character adjacent to the target character currently determining the first position information is referred to as a fourth target character.
Specifically, an included angle between the fourth target character and a preset third straight line of a target arc corresponding to the fourth target character is determined according to a first central angle corresponding to the fourth target character, where the preset third straight line of the target arc corresponding to the fourth target character is a connection line between a last point of the target arc corresponding to the fourth target character and a center of a circle corresponding to the target arc corresponding to the fourth target character in a clockwise direction, that is, the preset third straight line of the target arc corresponding to the fourth target character is a connection line between an intersection point of arcs adjacent to the target arc corresponding to the fourth target character in the clockwise direction and the center of the circle corresponding to the target arc corresponding to the fourth target character.
In order to determine whether the fourth target character and the third target character are on the same target arc, after determining an included angle between preset third straight lines of target arcs corresponding to the fourth target character and the fourth target character, determining whether the included angle is larger than an angle interval between every two adjacent target characters, if so, indicating that the third target character and the fourth target character are on one target arc, and determining first position information of the third target character according to a parameter equation of the target arc corresponding to the third target character (fourth target character) and the first radius of the target arc where the third target character (fourth target character) is located, and the angle interval between every two adjacent target characters. Specifically, the process of determining the first position information of the third target character according to the determined angle interval between each two adjacent target characters, the first radius of the target arc where the third target character (fourth target character) is located, and the parameter equation of the target arc corresponding to the third target character (fourth target character) is the prior art, and is not described herein again.
If the included angle is not greater than the determined angle interval between every two adjacent target texts, it is indicated that the third target text and the fourth target text are not located on the same target arc, for convenience of description, the arc where the third target text is located is referred to as a third target arc, the arc where the fourth target text is located is referred to as a fourth target arc, an included angle between a preset third straight line of the target arc corresponding to the fourth target text and the fourth target text is referred to as a target included angle, and in order to determine the first position information of the third target text, in the embodiment of the present invention, a difference value between an arc interval between every two adjacent target texts and a target included angle is determined, and the difference value is an angle interval of a preset third straight line of the third target text and the fourth target arc, where the preset third straight line is a circle corresponding to a first point of the third target arc and the third target arc in a clockwise direction, and the preset third straight line is referred to as a circle corresponding to the first point of the third target arc and the fourth target arc And a center connecting line, wherein in order to determine the first position information of the third target character, the first position information of the third target character can be determined according to an angle interval of a preset third straight line between the third target character and the fourth target arc and a parameter equation between a third radius corresponding to the third target arc and the third target arc. The process of determining the first position information of the third target character according to the angle interval between the third target character and the preset third straight line of the fourth target arc and the parameter equation between the third radius corresponding to the third target arc and the third target arc is the prior art, and is not described herein again.
Example 6:
in order to determine an angle interval between each two adjacent target characters, on the basis of the foregoing embodiments, in an embodiment of the present invention, the determining an angle interval between each two adjacent target characters according to a target angle distribution range corresponding to the character information and a target number of the target characters includes:
and determining the angle interval between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the third quotient of the target number of the target characters.
In the embodiment of the present invention, in order to determine the angle interval between every two adjacent target characters, a third quotient between the target angle distribution range corresponding to the character information and the target number of the target characters may be determined, and then the third quotient may be determined as the angle interval between every two adjacent target characters.
For example, if the target angle range of the text message is 240 degrees and the number of targets is 6, the angle interval between every two adjacent target texts is determined to be 40 degrees.
Example 7:
fig. 6 is a schematic structural diagram of an elliptical stamp generating apparatus according to some embodiments of the present invention, where the apparatus includes:
the drawing module 601 is used for drawing the arc ellipse by using a four-center method according to the preset ellipse major axis length and the ellipse minor axis length;
a determining module 602, configured to determine, according to a target number of target characters included in character information to be typeset and a target angle distribution range corresponding to the character information, first position information of each target character on the arc and ellipse; and for each target character, determining a target central angle corresponding to the target character on a target circular arc on the circular arc ellipse according to the first position information of the target character, determining a target centrifugal angle corresponding to the target central angle according to a corresponding relation between a central angle and a centrifugal angle which are stored in advance, determining second position information of the target character on a target elliptical seal according to the target centrifugal angle and a parameter equation of the ellipse which is stored in advance, and performing angle rotation on the target character according to the second position information.
In a possible implementation manner, the determining module 602 is specifically configured to determine, according to the target angle distribution range, a first central angle of a first target character at a preset first position on a first arc of the arc ellipse, determine, according to the first central angle, a first angle between first position information of the first target character on the arc ellipse and a first preset straight line of the first arc, and determine, according to a parameter equation corresponding to the first angle and the first arc saved in advance, first position information of the first target character on the arc ellipse.
In a possible implementation manner, the determining module 602 is specifically configured to determine, according to a target angle distribution range corresponding to the text information and a target number of the target text, an radian interval between every two adjacent target texts; and determining first position information of a second target character according to the radian interval and the first central angle corresponding to the previous target character.
In a possible implementation manner, the determining module 602 is specifically configured to determine, according to a target angle distribution range corresponding to the text information and a correspondence between a pre-stored distribution range and an arc, at least one arc on an arc ellipse corresponding to the target distribution range; determining the target arc length of the text information on the arc ellipse according to the first sum of the radians of the at least one arc; and determining the radian interval between every two adjacent target characters according to the target arc length and the first quotient of the target number of the target characters.
In a possible implementation manner, the determining module 602 is specifically configured to determine, according to the target angular distribution range, a first angle corresponding to the target angular distribution range; and determining a second quotient of the first angle and a preset first numerical value, determining a second sum of the second quotient and the preset second numerical value, and determining a first central angle, corresponding to the first target character at the preset first position, on a first arc of the arc ellipse.
In a possible implementation manner, the determining module 602 is specifically configured to determine an angle interval between every two adjacent target characters according to a target angle distribution range corresponding to the character information and a target number of the target characters; and aiming at each target character, determining first position information of the target character according to the angle interval and a first central angle corresponding to a previous target character adjacent to the target character.
In a possible implementation manner, the determining module 602 is specifically configured to determine an angle interval between every two adjacent target characters according to a third quotient between a target angle distribution range corresponding to the character information and the target number of the target characters.
Example 8:
on the basis of the foregoing embodiments, some embodiments of the present invention further provide an electronic device, as shown in fig. 7, including: a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702 and the memory 703 are communicated with each other via the communication bus 704.
The memory 703 has stored therein a computer program which, when executed by the processor 701, causes the processor 701 to perform the steps of:
drawing an arc ellipse by using a four-center method according to the preset ellipse major axis length and ellipse minor axis length;
determining first position information of each target character on the circular arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information;
and for each target character, determining a target central angle corresponding to the target character on a target circular arc on the circular arc ellipse according to the first position information of the target character, determining a target centrifugal angle corresponding to the target central angle according to a corresponding relation between the central angle and the centrifugal angle which are stored in advance, determining second position information of the target character on the target elliptical seal according to the target centrifugal angle and a parameter equation of the ellipse which is stored in advance, and performing angle rotation on the target character according to the second position information.
Further, the processor 701 is further configured to determine, according to the target angle distribution range, a first central angle, corresponding to a first target character at a preset first position, on a first arc of the arc ellipse, determine, according to the first central angle, a first angle between first position information of the first target character on the arc ellipse and a first preset straight line of the first arc, and determine, according to a parameter equation corresponding to the first angle and the first arc that is stored in advance, first position information of the first target character on the arc ellipse.
Further, the processor 701 is further configured to determine a radian interval between every two adjacent target characters according to a target angle distribution range corresponding to the character information and a target number of the target characters; and determining first position information of a second target character according to the radian interval and the first central angle corresponding to the previous target character.
Further, the processor 701 is further configured to determine at least one arc on the arc ellipse corresponding to the target distribution range according to the target angular distribution range corresponding to the text information and a correspondence between the pre-stored distribution range and the arc; determining the target arc length of the text information on the arc ellipse according to the first sum of the radians of the at least one arc; and determining the radian interval between every two adjacent target characters according to the target arc length and the first quotient of the target number of the target characters.
Further, the processor 701 is further configured to determine, according to the target angle distribution range, a first angle corresponding to the target angle distribution range; and determining a second quotient of the first angle and a preset first numerical value, determining a second sum of the second quotient and the preset second numerical value, and determining a first central angle corresponding to a first target character at a preset first position on a first arc of the arc ellipse.
Further, the processor 701 is further configured to determine an angle interval between every two adjacent target characters according to a target angle distribution range corresponding to the character information and the target number of the target characters; and aiming at each target character, determining first position information of the target character according to the angle interval and a first central angle corresponding to a previous target character adjacent to the target character.
Further, the processor 701 is further configured to determine an angle interval between every two adjacent target texts according to a third quotient between the target angle distribution range corresponding to the text information and the target number of the target texts.
The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean only one bus or one type of bus.
The communication interface 702 is used for communication between the above-described electronic apparatus and other apparatuses.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital instruction processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
Example 9:
on the basis of the foregoing embodiments, the present invention further provides a computer-readable storage medium, in which a computer program executable by an electronic device is stored, and when the program is run on the electronic device, the electronic device is caused to execute the following steps:
the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
drawing an arc ellipse by using a four-center method according to the preset ellipse major axis length and ellipse minor axis length;
determining first position information of each target character on the circular arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information;
and for each target character, determining a target central angle corresponding to the target character on a target circular arc on the circular arc ellipse according to the first position information of the target character, determining a target centrifugal angle corresponding to the target central angle according to a corresponding relation between the central angle and the centrifugal angle which are stored in advance, determining second position information of the target character on the target elliptical seal according to the target centrifugal angle and a parameter equation of the ellipse which is stored in advance, and performing angle rotation on the target character according to the second position information.
Further, the determining the first position information of each target character on the arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information includes:
according to the target angle distribution range, a first central angle corresponding to a first target character at a preset first position on a first circular arc of the circular arc ellipse is determined, according to the first central angle, a first angle between first position information of the first target character on the circular arc ellipse and a first preset straight line of the first circular arc is determined, and according to a parameter equation corresponding to the first angle and the first circular arc which is saved in advance, first position information of the first target character on the circular arc ellipse is determined.
Further, the determining the first position information of each target character on the arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information includes:
determining radian intervals between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters; and determining first position information of a second target character according to the radian interval and the first central angle corresponding to the previous target character.
Further, the determining the radian interval between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters comprises:
determining at least one circular arc on a circular arc ellipse corresponding to the target distribution range according to the target angle distribution range corresponding to the text information and the corresponding relation between the pre-stored distribution range and the circular arc;
determining the target arc length of the text information on the arc ellipse according to the first sum of the radians of the at least one arc;
and determining the radian interval between every two adjacent target characters according to the target arc length and the first quotient of the target number of the target characters.
Further, the determining, according to the target angle distribution range, a first central angle of the first target character at the preset first position on the first arc of the arc ellipse includes:
determining a first angle corresponding to the target angle distribution range according to the target angle distribution range;
and determining a second quotient of the first angle and a preset first numerical value, determining a second sum of the second quotient and the preset second numerical value, and determining a first central angle, corresponding to the first target character at the preset first position, on a first arc of the arc ellipse.
Further, the determining the first position information of each target character on the arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information includes:
determining the angle interval between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters;
and aiming at each target character, determining first position information of the target character according to the angle interval and a first central angle corresponding to a previous target character adjacent to the target character.
Further, the determining the angle interval between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters includes:
and determining the angle interval between every two adjacent target characters according to a third quotient of the target angle distribution range corresponding to the character information and the target number of the target characters.
According to the embodiment of the invention, the second position information of each target character on the target elliptical stamp can be determined based on the first position information corresponding to each target character on the arc ellipse drawn by the four-heart method, and the target character is subjected to angle rotation according to the second position information, so that an elliptical stamp sample can be generated, and the stamp character recognition accuracy of the stamp character model is improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is intended to include such modifications and variations.

Claims (10)

1. An elliptical seal generation method, characterized in that the method comprises:
drawing an arc ellipse by using a four-center method according to the preset ellipse major axis length and ellipse minor axis length;
determining first position information of each target character on the circular arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information;
and for each target character, determining a target central angle corresponding to the target character on a target circular arc on the circular arc ellipse according to the first position information of the target character, determining a target centrifugal angle corresponding to the target central angle according to a corresponding relation between a central angle and a centrifugal angle which are stored in advance, determining second position information of the target character on a target elliptical seal according to the target centrifugal angle and a parameter equation of the ellipse which is stored in advance, and performing angle rotation on the target character according to the second position information.
2. The method of claim 1, wherein the determining the first position information of each target character on the circular arc ellipse according to the target number of the target characters included in the character information to be typeset and the target angle distribution range corresponding to the character information comprises:
according to the target angle distribution range, a first central angle corresponding to a first target character at a preset first position on a first circular arc of the circular arc ellipse is determined, according to the first central angle, a first angle between first position information of the first target character on the circular arc ellipse and a first preset straight line of the first circular arc is determined, and according to a parameter equation corresponding to the first angle and the first circular arc which is saved in advance, first position information of the first target character on the circular arc ellipse is determined.
3. The method of claim 2, wherein the determining the first position information of each target character on the circular arc ellipse according to the target number of the target characters included in the character information to be typeset and the target angle distribution range corresponding to the character information comprises:
determining radian intervals between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters; and determining first position information of a second target character according to the radian interval and the first central angle corresponding to the previous target character.
4. The method of claim 3, wherein the determining the radian interval between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters comprises:
determining at least one circular arc on a circular arc ellipse corresponding to the target distribution range according to the target angle distribution range corresponding to the text information and the corresponding relation between the pre-stored distribution range and the circular arc;
determining the target arc length of the text information on the arc ellipse according to the first sum of the radians of the at least one arc;
and determining the radian interval between every two adjacent target characters according to the target arc length and the first quotient of the target number of the target characters.
5. The method of claim 2, wherein the determining, according to the target angle distribution range, a corresponding first central angle of a first target character at a preset first position on a first arc of the arc ellipse comprises:
determining a first angle corresponding to the target angle distribution range according to the target angle distribution range;
and determining a second quotient of the first angle and a preset first numerical value, determining a second sum of the second quotient and the preset second numerical value, and determining a first central angle, corresponding to the first target character at the preset first position, on a first arc of the arc ellipse.
6. The method of claim 2, wherein the determining the first position information of each target character on the circular arc ellipse according to the target number of the target characters included in the character information to be typeset and the target angle distribution range corresponding to the character information comprises:
determining the angle interval between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the target number of the target characters;
and aiming at each target character, determining first position information of the target character according to the angle interval and a first central angle corresponding to a previous target character adjacent to the target character.
7. The method of claim 6, wherein the determining the angle interval between every two adjacent target words according to the target angle distribution range corresponding to the word information and the target number of the target words comprises:
and determining the angle interval between every two adjacent target characters according to the target angle distribution range corresponding to the character information and the third quotient of the target number of the target characters.
8. An elliptical stamp generation apparatus, comprising:
the drawing module is used for drawing the arc ellipse by utilizing a four-center method according to the preset ellipse major axis length and the ellipse minor axis length;
the determining module is used for determining first position information of each target character on the circular arc ellipse according to the target number of the target characters contained in the character information to be typeset and the target angle distribution range corresponding to the character information; and for each target character, determining a target central angle corresponding to the target character on a target circular arc on the circular arc ellipse according to the first position information of the target character, determining a target centrifugal angle corresponding to the target central angle according to a corresponding relation between a central angle and a centrifugal angle which are stored in advance, determining second position information of the target character on a target elliptical seal according to the target centrifugal angle and a parameter equation of the ellipse which is stored in advance, and performing angle rotation on the target character according to the second position information.
9. An electronic device, characterized in that the electronic device comprises a processor and a memory, the memory is used for storing program instructions, and the processor is used for implementing the steps of the elliptical stamp generation method according to any one of the preceding claims 1-7 when executing the computer program stored in the memory.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when being executed by a processor, implements the steps of the elliptical stamp generation method according to any of the preceding claims 1 to 7.
CN202111294673.9A 2021-11-03 2021-11-03 Elliptical seal generation method, device, equipment and medium Pending CN114511614A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111294673.9A CN114511614A (en) 2021-11-03 2021-11-03 Elliptical seal generation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111294673.9A CN114511614A (en) 2021-11-03 2021-11-03 Elliptical seal generation method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114511614A true CN114511614A (en) 2022-05-17

Family

ID=81548140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111294673.9A Pending CN114511614A (en) 2021-11-03 2021-11-03 Elliptical seal generation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114511614A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116071755A (en) * 2023-04-07 2023-05-05 福昕鲲鹏(北京)信息科技有限公司 Text positioning method, device and equipment in electronic seal and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116071755A (en) * 2023-04-07 2023-05-05 福昕鲲鹏(北京)信息科技有限公司 Text positioning method, device and equipment in electronic seal and storage medium

Similar Documents

Publication Publication Date Title
CN108399386A (en) Information extracting method in pie chart and device
CN108985066B (en) Intelligent contract security vulnerability detection method, device, terminal and storage medium
CN111860489A (en) Certificate image correction method, device, equipment and storage medium
CN110738219A (en) Method and device for extracting lines in image, storage medium and electronic device
CN112966725B (en) Method and device for matching template images and terminal equipment
CN112699775A (en) Certificate identification method, device and equipment based on deep learning and storage medium
CN111476225B (en) In-vehicle human face identification method, device, equipment and medium based on artificial intelligence
CN112541443B (en) Invoice information extraction method, invoice information extraction device, computer equipment and storage medium
US20170091901A1 (en) Method and system for recognizing poi outside map screen
CN114511614A (en) Elliptical seal generation method, device, equipment and medium
CN109447080A (en) A kind of character identifying method and device
CN107368829A (en) The method and apparatus for determining the rectangular target areas in input picture
CN111739016A (en) Target detection model training method and device, electronic equipment and storage medium
CN112383554B (en) Interface flow abnormity detection method and device, terminal equipment and storage medium
CN109495556B (en) File processing method and device
EP4386610A1 (en) Intelligent rechecking method and apparatus for graph model
CN114332880A (en) Text detection method, device, equipment and storage medium
CN109145821B (en) Method and device for positioning pupil image in human eye image
CN109446054B (en) Processing method and terminal equipment for override operation request based on big data
CN116045996A (en) Method and equipment for determining road connection relation of crossing and generating virtual line of crossing
CN106447711B (en) A kind of multiple dimensioned basic geometry feature extracting method
CN107480710A (en) Feature Points Matching result processing method and device
CN113627394A (en) Face extraction method and device, electronic equipment and readable storage medium
CN111695441A (en) Image document processing method, device and computer readable storage medium
CN112711965B (en) Drawing recognition method, device and equipment

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