CN111445391A - Image contour point adjusting method, medium, device and apparatus - Google Patents

Image contour point adjusting method, medium, device and apparatus Download PDF

Info

Publication number
CN111445391A
CN111445391A CN202010156118.9A CN202010156118A CN111445391A CN 111445391 A CN111445391 A CN 111445391A CN 202010156118 A CN202010156118 A CN 202010156118A CN 111445391 A CN111445391 A CN 111445391A
Authority
CN
China
Prior art keywords
original
contour
adjustment
contour points
contour point
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
CN202010156118.9A
Other languages
Chinese (zh)
Other versions
CN111445391B (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.)
Gaoding Xiamen Technology Co Ltd
Original Assignee
Gaoding Xiamen Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gaoding Xiamen Technology Co Ltd filed Critical Gaoding Xiamen Technology Co Ltd
Priority to CN202010156118.9A priority Critical patent/CN111445391B/en
Publication of CN111445391A publication Critical patent/CN111445391A/en
Application granted granted Critical
Publication of CN111445391B publication Critical patent/CN111445391B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/403Edge-driven scaling

Abstract

The invention discloses an image contour point adjusting method, medium, equipment and device, wherein the method comprises the following steps: acquiring an original contour point and adjustment information corresponding to the original contour point; calculating corresponding original adjustment contour points according to the original contour points and the adjustment information; calculating a first vector formed by the original contour points and the next original contour point in sequence according to the sequence of the original contour points, and calculating a second vector formed by the two corresponding original adjustment contour points; judging whether an included angle between the first vector and the second vector is an obtuse angle, if so, retaining the original adjustment contour point corresponding to the second vector, if not, deleting the original adjustment contour point corresponding to the second vector, circulating the steps until all the original contour points and the original adjustment contour points are judged completely, and determining a final adjustment contour point according to the judgment result; the method can be suitable for any contour curve, the complexity of the contour point adjusting process is reduced, and the response efficiency of the contour point adjusting process is improved.

Description

Image contour point adjusting method, medium, device and apparatus
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image contour point adjustment method, a computer-readable storage medium, a computer device, and an image contour point adjustment apparatus.
Background
Scaling of contours is a function of delineation, which is an important tool in the field of design.
In the related art, in the process of scaling the profile, the original binary image is expanded by adopting a polygon fitting or morphological method for the scaled scatter points; however, the polygon fitting method can only be applied to the contour of a convex polygon, but cannot be applied to a concave polygon; the expansion mode has a very complicated calculation process and a large amount of calculation data, and is difficult to adjust the profile in real time according to the operation of a user.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, an object of the present invention is to provide an image contour point adjusting method, which is applicable to adjusting any contour curve, and at the same time, reduces the complexity of the contour point adjusting process and improves the response efficiency of the contour point adjusting process.
A second object of the invention is to propose a computer-readable storage medium.
A third object of the invention is to propose a computer device.
A fourth object of the present invention is to provide an image contour point adjusting apparatus.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides an image contour point adjusting method, including the following steps:
S101, acquiring an original contour point and adjustment information corresponding to the original contour point;
S102, calculating corresponding original adjustment contour points according to the original contour points and the adjustment information;
S103, calculating a first vector formed by the original contour points and the next original contour point according to the sequence of the original contour points, and calculating a second vector formed by the two corresponding original adjustment contour points;
S104, judging whether an included angle between the first vector and the second vector is an obtuse angle, if so, retaining the original adjustment contour point corresponding to the second vector, if not, deleting the original adjustment contour point corresponding to the second vector, and returning to the step S103;
And S105, circulating the step S103 and the step S104 until all the original contour points and the original adjusting contour points are judged, and determining final adjusting contour points according to the judgment result.
According to the image contour point adjusting method provided by the embodiment of the invention, firstly, an original contour point and adjusting information corresponding to the original contour point are obtained; then, calculating corresponding original adjustment contour points according to the original contour points and the adjustment information; then, calculating a first vector formed by the original contour points and the next original contour point in sequence according to the sequence of the original contour points, and calculating a second vector formed by the two corresponding original adjustment contour points; then, judging whether an included angle between the first vector and the second vector is an obtuse angle, if so, retaining the original adjustment contour point corresponding to the second vector, if not, deleting the original adjustment contour point corresponding to the second vector, circularly judging until all the original contour points and the original adjustment contour points are judged completely, and determining a final adjustment contour point according to the judgment result; therefore, the method is suitable for adjusting any contour curve, and meanwhile, the complexity of the contour point adjusting process is reduced, and the response efficiency of the contour point adjusting process is improved.
In addition, the image contour point adjusting method proposed according to the above embodiment of the present invention may further have the following additional technical features:
Optionally, the adjusting information includes an adjusting direction and an adjusting distance, where calculating a corresponding original adjusting contour point according to the original contour point and the adjusting information includes: and calculating a normal corresponding to the original contour point according to the adjusting direction, and determining the original adjusting contour point corresponding to the original contour point according to the direction of the normal and the adjusting distance.
Optionally, after finishing the judgment of all the original contour points and the original adjusted contour points, the method further includes: and sampling the reserved original adjustment contour points to obtain continuous original adjustment contour points, and taking the continuous original adjustment contour points as final adjustment contour points.
To achieve the above object, a second embodiment of the present invention provides a computer-readable storage medium, on which an image contour point adjusting program is stored, and the image contour point adjusting program, when executed by a processor, implements the image contour point adjusting method as described above.
According to the computer-readable storage medium of the embodiment of the invention, the image contour point adjusting program is stored, so that the processor realizes the image contour point adjusting method when executing the image contour point adjusting program, thereby the method is suitable for adjusting any contour curve, and simultaneously, the complexity of the contour point adjusting process is reduced, and the response efficiency of the contour point adjusting process is improved.
In order to achieve the above object, a third embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the image contour point adjusting method as described above.
According to the computer equipment provided by the embodiment of the invention, the image contour point adjusting program is stored through the memory, so that the processor realizes the image contour point adjusting method when executing the image contour point adjusting program, the method is suitable for adjusting any contour curve, meanwhile, the complexity of the contour point adjusting process is reduced, and the response efficiency of the contour point adjusting process is improved.
In order to achieve the above object, a fourth aspect of the present invention provides an image contour point adjusting apparatus, including: the acquisition module is used for acquiring an original contour point and adjustment information corresponding to the original contour point; the calculation module is used for calculating corresponding original adjustment contour points according to the original contour points and the adjustment information, calculating a first vector formed by the original contour points and the next original contour point according to the sequence of the original contour points, and calculating a second vector formed by the two corresponding original adjustment contour points; and the judging module is used for judging whether an included angle between the first vector and the second vector is an obtuse angle, reserving the original adjustment contour point corresponding to the second vector if the judging result is yes, deleting the original adjustment contour point corresponding to the second vector if the judging result is no, circularly judging until all the original contour points and the original adjustment contour points are judged completely, and determining the final adjustment contour point according to the judging result.
According to the image contour point adjusting device provided by the embodiment of the invention, the acquisition module is arranged for acquiring the original contour point and the adjusting information corresponding to the original contour point; the calculation module is used for calculating corresponding original adjustment contour points according to the original contour points and the adjustment information, calculating a first vector formed by the original contour points and the next original contour point in sequence according to the sequence of the original contour points, and calculating a second vector formed by the two corresponding original adjustment contour points; the judging module is used for judging whether an included angle between the first vector and the second vector is an obtuse angle, reserving an original adjusting contour point corresponding to the second vector when the judging result is yes, deleting the original adjusting contour point corresponding to the second vector when the judging result is no, circularly judging until all the original contour points and the original adjusting contour points are judged completely, and determining a final adjusting contour point according to the judging result; therefore, the method is suitable for adjusting any contour curve, and meanwhile, the complexity of the contour point adjusting process is reduced, and the response efficiency of the contour point adjusting process is improved.
In addition, the image contour point adjusting apparatus proposed according to the above-mentioned embodiment of the present invention may further have the following additional technical features:
Optionally, the adjusting information includes an adjusting direction and an adjusting distance, where calculating a corresponding original adjusting contour point according to the original contour point and the adjusting information includes: and calculating a normal corresponding to the original contour point according to the adjusting direction, and determining the original adjusting contour point corresponding to the original contour point according to the direction of the normal and the adjusting distance.
Optionally, the method further comprises: and the sampling module is used for sampling the reserved original adjustment contour points after all the original contour points and the original adjustment contour points are judged, so as to obtain continuous original adjustment contour points, and the continuous original adjustment contour points are used as final adjustment contour points.
Drawings
FIG. 1 is a flowchart illustrating an image contour point adjustment method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an original adjusted contour point preservation according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating an original adjusted contour point deletion according to an embodiment of the present invention;
FIG. 4 is a block diagram of an image contour point adjusting apparatus according to an embodiment of the present invention;
FIG. 5 is a block diagram of an apparatus for adjusting contour points of an image according to another embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
In the related art, in the process of scaling the outline, the polygon fitting mode can only be suitable for the outline of a convex polygon and cannot be suitable for a concave polygon; the expansion mode has extremely complex calculation process and large calculation data amount, and is difficult to adjust the profile in real time according to the operation of a user; according to the image contour point adjusting method provided by the embodiment of the invention, firstly, an original contour point and adjusting information corresponding to the original contour point are obtained; then, calculating corresponding original adjustment contour points according to the original contour points and the adjustment information; then, calculating a first vector formed by the original contour points and the next original contour point in sequence according to the sequence of the original contour points, and calculating a second vector formed by the two corresponding original adjustment contour points; then, judging whether an included angle between the first vector and the second vector is an obtuse angle, if so, retaining the original adjustment contour point corresponding to the second vector, if not, deleting the original adjustment contour point corresponding to the second vector, circularly judging until all the original contour points and the original adjustment contour points are judged completely, and determining a final adjustment contour point according to the judgment result; therefore, the method is suitable for adjusting any contour curve, and meanwhile, the complexity of the contour point adjusting process is reduced, and the response efficiency of the contour point adjusting process is improved.
In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Fig. 1 is a schematic flow chart of an image contour point adjusting method according to an embodiment of the present invention, as shown in fig. 1, the image contour point adjusting method includes the following steps:
S101, acquiring an original contour point and adjustment information corresponding to the original contour point;
That is to say, after the image to be processed is acquired, corresponding original contour points are extracted according to the image to be processed, and adjustment information of the user for the original contour points is acquired.
The method for extracting the original contour point corresponding to the image to be processed has been described in detail in the prior art, and is not described herein again.
The information contained in the adjustment information can be various; for example, including adjustment direction and adjustment distance; furthermore, the adjustment information may be acquired in various manners.
As an example, the adjustment information is determined by a value input by a user, and if the value input by the user is +50, the adjustment information is represented as outward expansion by 50 pixels (that is, the adjustment direction is a direction away from the image to be processed, and the distance is 50 pixels); and if the value input by the user is-50, it indicates that the adjustment information is to zoom in by 50 pixels (i.e., the adjustment direction is toward the image to be processed, and the distance is 50 pixels).
As another example, the adjustment direction is obtained according to operation information of the mouse by the user, after the user continuously clicks the mouse, the adjustment direction is obtained according to the moving direction of the mouse, and the adjustment distance is determined according to the distance between the position where the user finally releases the mouse and the position where the mouse is initially clicked.
As another example, first, an adjusting module corresponding to the adjusting information is set, where the adjusting module includes an adjusting slide bar and an adjusting block, initially, the adjusting block is at a critical point on the adjusting slide bar, when the user controls the adjusting block to move leftward, the adjusting direction is indicated as inward contraction, and an adjusting distance is determined according to a distance between the adjusting block and the critical point; when the user controls the adjusting block to move rightwards, the adjusting direction is outward expansion, and the adjusting distance is determined according to the distance between the adjusting block and the critical point.
S102, calculating corresponding original adjustment contour points according to the original contour points and the adjustment information;
That is, the original contour points and the adjustment information are calculated to obtain the original adjustment contour points corresponding to the original contour points.
There are various ways to calculate the corresponding original adjustment contour points according to the original contour points and the adjustment information.
As an example, calculating corresponding original adjusted contour points from the original contour points and the adjustment information includes: and calculating a normal corresponding to the original contour point according to the adjustment direction, and determining the original adjustment contour point corresponding to the original contour point according to the direction of the normal and the adjustment distance.
S103, calculating a first vector formed by the original contour points and the next original contour point according to the sequence of the original contour points, and calculating a second vector formed by the two corresponding original adjusting contour points;
S104, judging whether an included angle between the first vector and the second vector is an obtuse angle, if so, retaining the original adjustment contour point corresponding to the second vector, if not, deleting the original adjustment contour point corresponding to the second vector, and returning to the step S103;
As an example, as shown in fig. 2 and fig. 3, fig. 2 is an example that the original adjustment contour points need to be retained, and fig. 3 is an example that the original adjustment contour points need to be deleted; in fig. 2 and 3, a vector ab represents a vector formed by the two adjacent original contour points, i.e., a first vector; the vector cd represents a vector formed by the two adjacent original adjustment contour points, namely a second vector; further, whether an included angle formed by the first vector and the second vector is an obtuse angle is judged, if the included angle is an obtuse angle, as shown in fig. 3, a vector ac formed by the original contour point a and the corresponding original adjustment contour point c intersects with a vector bd formed by the next original contour point b and the corresponding original adjustment contour point d; thus, deleting the original adjustment contour points c and d according to the judgment result; on the contrary, if the included angle formed by the first vector and the second vector is an acute angle or a right angle, as shown in fig. 2, it indicates that the vector ac does not intersect with the vector bd, and the original adjustment contour points c and d are considered as valid points and are reserved.
It should be noted that, the above-mentioned judging process is performed in sequence, that is, the judgment of the original contour point and the original adjustment contour point is performed in sequence according to the sequence of each point in the point list; for example, in the judgments of fig. 2 and 3, the profile runs counter-clockwise; and vice versa clockwise.
And S105, looping the step S103 and the step S104 until all the original contour points and the original adjustment contour points are judged, and determining final adjustment contour points according to the judgment result.
That is, the steps S103 and S104 are executed in a loop until all the original contour points and the original adjusted contour points are determined, so as to determine the final adjusted contour points according to the determination result.
As an example, when 6 original adjustment contour points (0,1,2,3,4,5,) are included in the point list; firstly, according to the sorting of points in the point list, judging whether the point 0 and the point 1 meet the conditions according to the step S103 and the step S104, if so, reserving the point 0 and the point 1, then judging whether the point 1 and the point 2 meet the conditions according to the step S103 and the step S104, and if so, reserving the point 1 and the point 2; then, judging whether the point 2 and the point 3 meet the conditions according to the step S103 and the step S104, and if not, deleting the point 2 and the point 3; next, it is determined whether or not the point 1 and the point 4 meet the conditions according to the step S103 and the step S104; and circulating until 6 points in the point list are judged.
In some embodiments, after all the original contour points and the original adjusted contour points are determined, the method further includes:
And sampling the reserved original adjustment contour points to obtain continuous original adjustment contour points, and taking the continuous original adjustment contour points as final adjustment contour points to ensure the continuity of the final adjustment contour points.
In summary, according to the image contour point adjustment method of the embodiment of the present invention, first, the original contour point and the adjustment information corresponding to the original contour point are obtained; then, calculating corresponding original adjustment contour points according to the original contour points and the adjustment information; then, calculating a first vector formed by the original contour points and the next original contour point in sequence according to the sequence of the original contour points, and calculating a second vector formed by the two corresponding original adjustment contour points; then, judging whether an included angle between the first vector and the second vector is an obtuse angle, if so, retaining the original adjustment contour point corresponding to the second vector, if not, deleting the original adjustment contour point corresponding to the second vector, circularly judging until all the original contour points and the original adjustment contour points are judged completely, and determining a final adjustment contour point according to the judgment result; therefore, the method is suitable for adjusting any contour curve, and meanwhile, the complexity of the contour point adjusting process is reduced, and the response efficiency of the contour point adjusting process is improved.
In order to achieve the above embodiments, an embodiment of the present invention proposes a computer-readable storage medium on which an image contour point adjustment program is stored, which when executed by a processor implements the image contour point adjustment method as described above.
According to the computer-readable storage medium of the embodiment of the invention, the image contour point adjusting program is stored, so that the processor realizes the image contour point adjusting method when executing the image contour point adjusting program, thereby the method is suitable for adjusting any contour curve, and simultaneously, the complexity of the contour point adjusting process is reduced, and the response efficiency of the contour point adjusting process is improved.
In order to implement the foregoing embodiments, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the image contour point adjusting method as described above.
According to the computer equipment provided by the embodiment of the invention, the image contour point adjusting program is stored through the memory, so that the processor realizes the image contour point adjusting method when executing the image contour point adjusting program, the method is suitable for adjusting any contour curve, meanwhile, the complexity of the contour point adjusting process is reduced, and the response efficiency of the contour point adjusting process is improved.
In order to achieve the above embodiments, an embodiment of the present invention provides an image contour point adjusting apparatus, as shown in fig. 4, the image contour point adjusting apparatus including: the device comprises an acquisition module 10, a calculation module 20 and a judgment module 30.
The acquisition module 10 is configured to acquire an original contour point and adjustment information corresponding to the original contour point;
The calculating module 20 is configured to calculate corresponding original adjustment contour points according to the original contour points and the adjustment information, and calculate a first vector formed by the original contour points and a next original contour point in sequence according to the sequence of the original contour points, and calculate a second vector formed by two corresponding original adjustment contour points;
The judging module 30 is configured to judge whether an included angle between the first vector and the second vector is an obtuse angle, and if the judging result is yes, retain the original adjustment contour point corresponding to the second vector, and if the judging result is no, delete the original adjustment contour point corresponding to the second vector, perform cyclic judgment until all the original contour points and the original adjustment contour points are judged completely, and determine a final adjustment contour point according to the judging result.
In some embodiments, the adjusting information includes an adjusting direction and an adjusting distance, wherein calculating corresponding original adjusting contour points according to the original contour points and the adjusting information includes: and calculating a normal corresponding to the original contour point according to the adjusting direction, and determining the original adjusting contour point corresponding to the original contour point according to the direction of the normal and the adjusting distance.
In some embodiments, as shown in fig. 5, the image contour point adjusting apparatus further includes: and a sampling module 40, wherein the sampling module 40 is configured to sample the retained original adjustment contour points after all the original contour points and the original adjustment contour points are determined, so as to obtain continuous original adjustment contour points, and use the continuous original adjustment contour points as final adjustment contour points.
It should be noted that the above description about the method for adjusting the image contour points in fig. 1 is also applicable to the apparatus for adjusting the image contour points, and is not repeated herein.
In summary, according to the image contour point adjusting apparatus of the embodiment of the present invention, the obtaining module is configured to obtain the original contour point and the adjustment information corresponding to the original contour point; the calculation module is used for calculating corresponding original adjustment contour points according to the original contour points and the adjustment information, calculating a first vector formed by the original contour points and the next original contour point in sequence according to the sequence of the original contour points, and calculating a second vector formed by the two corresponding original adjustment contour points; the judging module is used for judging whether an included angle between the first vector and the second vector is an obtuse angle, reserving an original adjusting contour point corresponding to the second vector when the judging result is yes, deleting the original adjusting contour point corresponding to the second vector when the judging result is no, circularly judging until all the original contour points and the original adjusting contour points are judged completely, and determining a final adjusting contour point according to the judging result; therefore, the method is suitable for adjusting any contour curve, and meanwhile, the complexity of the contour point adjusting process is reduced, and the response efficiency of the contour point adjusting process 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 is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of 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 should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
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 also intended to include such modifications and variations.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above should not be understood to necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (8)

1. An image contour point adjusting method is characterized by comprising the following steps:
S101, acquiring an original contour point and adjustment information corresponding to the original contour point;
S102, calculating corresponding original adjustment contour points according to the original contour points and the adjustment information;
S103, calculating a first vector formed by the original contour points and the next original contour point according to the sequence of the original contour points, and calculating a second vector formed by the two corresponding original adjustment contour points;
S104, judging whether an included angle between the first vector and the second vector is an obtuse angle, if so, retaining the original adjustment contour point corresponding to the second vector, if not, deleting the original adjustment contour point corresponding to the second vector, and returning to the step S103;
And S105, circulating the step S103 and the step S104 until all the original contour points and the original adjusting contour points are judged, and determining final adjusting contour points according to the judgment result.
2. The method for adjusting image contour points according to claim 1, wherein the adjustment information includes an adjustment direction and an adjustment distance, wherein calculating corresponding original adjustment contour points according to the original contour points and the adjustment information includes:
And calculating a normal corresponding to the original contour point according to the adjusting direction, and determining the original adjusting contour point corresponding to the original contour point according to the direction of the normal and the adjusting distance.
3. The image contour point adjusting method according to claim 1, further comprising: after all the original contour points and the original adjusted contour points are judged, the method further comprises the following steps:
And sampling the reserved original adjustment contour points to obtain continuous original adjustment contour points, and taking the continuous original adjustment contour points as final adjustment contour points.
4. A computer-readable storage medium, having stored thereon an image contour point adjusting program which, when executed by a processor, implements the image contour point adjusting method according to any one of claims 1 to 3.
5. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, implements the image contour point adjustment method according to any one of claims 1 to 3.
6. An image contour point adjusting apparatus, comprising:
The acquisition module is used for acquiring an original contour point and adjustment information corresponding to the original contour point;
The calculation module is used for calculating corresponding original adjustment contour points according to the original contour points and the adjustment information, calculating a first vector formed by the original contour points and the next original contour point according to the sequence of the original contour points, and calculating a second vector formed by the two corresponding original adjustment contour points;
And the judging module is used for judging whether an included angle between the first vector and the second vector is an obtuse angle, reserving the original adjustment contour point corresponding to the second vector if the judging result is yes, deleting the original adjustment contour point corresponding to the second vector if the judging result is no, circularly judging until all the original contour points and the original adjustment contour points are judged completely, and determining the final adjustment contour point according to the judging result.
7. The image contour point adjusting apparatus according to claim 6, wherein the adjustment information includes an adjustment direction and an adjustment distance, wherein calculating corresponding original adjustment contour points from the original contour points and the adjustment information includes:
And calculating a normal corresponding to the original contour point according to the adjusting direction, and determining the original adjusting contour point corresponding to the original contour point according to the direction of the normal and the adjusting distance.
8. The image contour point adjusting apparatus according to claim 6, further comprising:
And the sampling module is used for sampling the reserved original adjustment contour points after all the original contour points and the original adjustment contour points are judged, so as to obtain continuous original adjustment contour points, and the continuous original adjustment contour points are used as final adjustment contour points.
CN202010156118.9A 2020-03-09 2020-03-09 Image contour point adjusting method, medium, device and apparatus Active CN111445391B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010156118.9A CN111445391B (en) 2020-03-09 2020-03-09 Image contour point adjusting method, medium, device and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010156118.9A CN111445391B (en) 2020-03-09 2020-03-09 Image contour point adjusting method, medium, device and apparatus

Publications (2)

Publication Number Publication Date
CN111445391A true CN111445391A (en) 2020-07-24
CN111445391B CN111445391B (en) 2022-08-16

Family

ID=71627358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010156118.9A Active CN111445391B (en) 2020-03-09 2020-03-09 Image contour point adjusting method, medium, device and apparatus

Country Status (1)

Country Link
CN (1) CN111445391B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4771474A (en) * 1983-10-03 1988-09-13 Shaken Co., Ltd. Apparatus for processing character or pictorial image data
JP2009015706A (en) * 2007-07-06 2009-01-22 Konami Digital Entertainment:Kk Image generation device, image generation method and program
US20090148059A1 (en) * 2007-12-10 2009-06-11 Sharp Kabushiki Kaisha Image processing apparatus, image display apparatus, image forming apparatus, image processing method and storage medium
EP2807609A1 (en) * 2013-04-01 2014-12-03 Aselsan Elektronik Sanayi ve Ticaret Anonim Sirketi System and method for describing image outlines
US20150199588A1 (en) * 2014-01-14 2015-07-16 Microsoft Corporation Stereo image processing using contours
CN108898147A (en) * 2018-06-27 2018-11-27 清华大学 A kind of two dimensional image edge straightened method, apparatus based on Corner Detection
US20190261024A1 (en) * 2015-11-17 2019-08-22 Evernote Corporation Coordinated piecewise bezier vectorization

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4771474A (en) * 1983-10-03 1988-09-13 Shaken Co., Ltd. Apparatus for processing character or pictorial image data
JP2009015706A (en) * 2007-07-06 2009-01-22 Konami Digital Entertainment:Kk Image generation device, image generation method and program
US20090148059A1 (en) * 2007-12-10 2009-06-11 Sharp Kabushiki Kaisha Image processing apparatus, image display apparatus, image forming apparatus, image processing method and storage medium
EP2807609A1 (en) * 2013-04-01 2014-12-03 Aselsan Elektronik Sanayi ve Ticaret Anonim Sirketi System and method for describing image outlines
US20150199588A1 (en) * 2014-01-14 2015-07-16 Microsoft Corporation Stereo image processing using contours
US20190261024A1 (en) * 2015-11-17 2019-08-22 Evernote Corporation Coordinated piecewise bezier vectorization
CN108898147A (en) * 2018-06-27 2018-11-27 清华大学 A kind of two dimensional image edge straightened method, apparatus based on Corner Detection

Also Published As

Publication number Publication date
CN111445391B (en) 2022-08-16

Similar Documents

Publication Publication Date Title
CN111815599B (en) Image processing method, device, equipment and storage medium
KR101922683B1 (en) Method and apparatus for updating a background model used for background subtraction of an image
CN108961180B (en) Infrared image enhancement method and system
US8983199B2 (en) Apparatus and method for generating image feature data
KR101618996B1 (en) Sampling method and image processing apparatus for estimating homography
JP5706647B2 (en) Information processing apparatus and processing method thereof
KR101909544B1 (en) Apparatus and method for plane detection
CN110136080B (en) Image restoration method and device
CN111027343B (en) Bar code region positioning method and device
CN109242807B (en) Rendering parameter adaptive edge softening method, medium, and computer device
CN112669290A (en) Image comparison method and device
JP2009163616A (en) Image interpolation device, image interpolation method, and image interpolation program
CN111784564A (en) Automatic cutout method and system
JP5192437B2 (en) Object region detection apparatus, object region detection method, and object region detection program
JP6994890B2 (en) Crack detector, crack detection method, and computer program
JP6936684B2 (en) Crack detection device, crack detection method, and computer program
CN113112518A (en) Feature extractor generation method and device based on spliced image and computer equipment
CN110751654A (en) Image matting method, medium, equipment and device
KR101674802B1 (en) Method and apparatus for real time detection of airborne fibers by image processing program
CN111445391B (en) Image contour point adjusting method, medium, device and apparatus
CN107948721B (en) Method and device for pushing information
US9916663B2 (en) Image processing method and process simulation apparatus
CN112712089A (en) Obstacle detection method, obstacle detection device, computer device, and storage medium
CN116596895A (en) Substation equipment image defect identification method and system
CN110136061B (en) Resolution improving method and system based on depth convolution prediction and interpolation

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