WO2017101454A1 - 信息处理方法及装置 - Google Patents
信息处理方法及装置 Download PDFInfo
- Publication number
- WO2017101454A1 WO2017101454A1 PCT/CN2016/092174 CN2016092174W WO2017101454A1 WO 2017101454 A1 WO2017101454 A1 WO 2017101454A1 CN 2016092174 W CN2016092174 W CN 2016092174W WO 2017101454 A1 WO2017101454 A1 WO 2017101454A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- line
- vector line
- closed area
- deleted
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—Two-dimensional [2D] image generation
- G06T11/20—Drawing from basic elements
- G06T11/23—Drawing from basic elements using straight lines or curves
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—Two-dimensional [2D] image generation
- G06T11/20—Drawing from basic elements
Definitions
- the present invention relates to the field of image processing technologies, and in particular, to an information processing method, apparatus, and electronic device.
- the inventors have found that the prior art determines the vector lines that need to be deleted through complicated mathematical calculations and image processing methods, requires a high computer configuration, and occupies more computer resources.
- the present invention provides the following technical solutions:
- An information processing method includes:
- the vector line deletion range is outside the target closed area or outside the target closed area;
- the two end points of the target vector line are all within the target closed area, or both outside the target closed area, determine whether the target vector line is a line to be deleted by the vector line deletion range;
- the target line is equally divided into a plurality of segments, if the first equal point of the adjacent two equal points is located in the target closed area And a second halving point of the two adjacent bisector points is located outside the target closed area, and determining that one of the adjacent two bisector points is the target vector line and the target is closed Intersection of the area;
- a partial line on the target vector line that needs to be deleted is determined based on a relationship between two end points of the target vector line and the target closed area, an intersection of the target vector line and the target closed area, and the vector line deletion range.
- both end points of the target vector line are in the target closed area, or both outside the target closed area, determine whether the target vector line is Lines that need to be removed, including:
- the vector line deletion range is within the target closed area, determine that the target vector line is a line that needs to be deleted
- both end points of the target vector line are outside the target closed area, and the vector line deletion range is outside the target closed area, it is determined that the target vector line is a line that needs to be deleted.
- the relationship between the two end points of the target vector line and the target closed area, the intersection of the target vector line and the target closed area, and the vector line deletion range determine the target vector line
- the target The part of the line on the vector line that needs to be deleted is: the line between the first end point and the intersection point on the line of the target vector;
- the target The part of the line on the vector line that needs to be deleted is: the line between the second end point and the intersection point on the line of the target vector.
- determining one of the adjacent two equal points is an intersection of the target vector line and the target closed area, including:
- Determining a point in the adjacent closed area of the adjacent two equal points is an intersection of the target vector line and the target closed area.
- the above method preferably, further includes:
- An information processing apparatus comprising:
- a first determining module configured to determine a target closed area, a vector line deletion range, and at least one target vector line; the vector line deletion range is outside the target closed area or outside the target closed area;
- a judging module configured to determine, for each piece of the target vector line, a relationship between two end points of the target vector line and the target closed area
- a second determining module configured to determine, if the two end points of the target vector line are in the target closed area, or outside the target closed area, determine whether the target vector line is needed by using the vector line deletion range Deleted line;
- a third determining module configured to: if only one end point of the two end points of the target vector line is located in the target area, divide the target line into a plurality of segments equally, if the first equal point of the adjacent two equal points Located in the target closed area, a second one of the adjacent two equal points is located outside the target closed area, and one of the adjacent two equal points is determined as the target The intersection of the vector line and the closed area of the target;
- a fourth determining module configured to determine a relationship between two end points of the target vector line and the target closed area, an intersection of the target vector line and the target closed area, and the vector line deletion range determines that the target vector line needs Part of the line that was deleted.
- the second determining module comprises
- a first determining unit configured to determine that the target vector line is a line to be deleted if both end points of the target vector line are in the target closed area, and the vector line deletion range is in the target closed area ;
- a second determining unit configured to determine that the target vector line is a line to be deleted if both end points of the target vector line are outside the target closed area, and the vector line deletion range is outside the target closed area .
- the fourth determining module comprises:
- a third determining unit configured to: if a first end point of the two end points of the target vector line is located in the target closed area, the second end point is located outside the target closed area, and the deletion range of the vector line is a target In the enclosed area, the part of the line of the target vector that needs to be deleted is: a line between the first end point and the intersection point on the line of the target vector;
- a fourth determining unit configured to: if the first end point of the two end points of the target vector line is located in the target closed area, the second end point is located outside the target closed area, and the vector line is deleted The portion of the target vector line that needs to be deleted is the line between the second endpoint and the intersection on the target vector line, except that the range is the target closed area.
- the third determining module is configured to determine that one of the adjacent two bisectors is an intersection of the target vector line and the target closed area, and the determining the adjacent two The point in the target closed area among the equal dividing points is the intersection of the target vector line and the target closed area.
- the above device preferably, further comprises:
- a deleting module configured to delete all the determined lines that need to be deleted after each line in the at least one target vector line determines the part that needs to be deleted.
- an information processing method and apparatus determine a target closed area, a vector line deletion range, and at least one target vector line. For each target vector line, according to the two end points and targets of the target vector line The relationship between the closed area and the target closed area is determined.
- the target vector line is a line to be deleted, and if there is an intersection, the line from the target vector Determining a point among the plurality of aliquots is an intersection of the target vector line and the target closed area, so that based on the intersection, the relationship between the two end points of the target vector line and the target closed area, and the vector line deletion range determine the target
- the part of the line on the vector line that needs to be deleted is simple to calculate and has a small amount of computation, so that the vector line that needs to be deleted is determined with a lower computer configuration.
- FIG. 1 is a flowchart of an implementation of an information processing method according to an embodiment of the present application
- FIG. 2 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present disclosure
- FIG. 3 is a schematic structural diagram of a second determining module according to an embodiment of the present disclosure.
- FIG. 4 is a schematic structural diagram of a fourth determining module according to an embodiment of the present application.
- FIG. 5 is another schematic structural diagram of an information processing apparatus according to an embodiment of the present disclosure.
- FIG. 1 is a flowchart of an implementation of an information processing method according to an embodiment of the present disclosure, which may include:
- Step S11 determining a target closed area, a vector line deletion range, and at least one target vector line; the vector line deletion range is outside the target closed area or outside the target closed area;
- the user may need to delete some lines in a closed area, or may need to delete some lines outside the closed area.
- the target closed area, the vector line deletion range, and the at least one target vector line may be selected by the user.
- the display vector line deletion range option list is triggered by the user's preset operation, and the user selects the vector line deletion range from the list.
- all the vector lines may have no intersection with the target closed area.
- all the vector lines may be located in the target closed area, or all the vector lines may be located outside the target closed area, or One part of the vector line is located in the closed area of the target, and the other part of the vector line is outside the closed area of the target.
- all vector lines may also intersect with the target closed area; or, in the selected at least one target vector line, some vector lines and the target closed area have intersections, and some vector lines There is no intersection with the target closed area.
- Step S12 determining, for each piece of the target vector line, a relationship between two end points of the target vector line and the target closed area;
- the part of the target vector line that needs to be deleted is determined line by line.
- Step S13 If both end points of the target vector line are in the target closed area, or both are outside the target closed area, determine whether the target vector line is a line to be deleted by the vector line deletion range;
- Step S14 If only one end point of the two end points of the target vector line is located in the target area, divide the target line into a plurality of segments equally, if the first equal point of the adjacent two equal points is located in the target In the closed area, a second of the two adjacent points is located outside the target closed area, and one of the adjacent two equal points is determined to be the target vector line and the target The intersection of closed areas;
- each target vector line For each target vector line, if only one end point of the two end points of the target vector line is located in the target area, it indicates that the target vector line has an intersection with the target closed curve. Then, according to the vector line deletion range, only a part of the target vector line can be deleted, and the intersection of the target vector line and the target closed area needs to be obtained.
- the target vector line is equally divided into several equal parts (for example, 20 equal parts, of course, the embodiment of the present invention is not limited to the target vector line.
- the average is divided into 20 equal parts, the more the division, the higher the precision.
- a point is determined from several equal points on the target vector line as the intersection of the vector line and the target closed area.
- the first of the two endpoints of the target vector line is within the target enclosed area and the second endpoint is outside the target closed area.
- traversing each of the bisector points on the target vector line sequentially, if the i-th bisector on the target vector line is in the target closed area, and the i+1th The aliquot is outside the target closed area, then the i-th aliquot can be determined, or the i+1 quintile is the intersection of the target vector line and the target closed area.
- the i-th bisector on the target vector line is outside the target closed area, and the i+1th The aliquot is in the target closed area, then the i-th aliquot can be determined, or the i+1 quintile is the intersection of the target vector line and the target closed area.
- a point in the target two closed points that is located in the target closed area may be determined as an intersection of the target vector line and the target closed area.
- the halving point is also determined to be within the target closed area when the halving point is on the edge of the target closed area, the point in the target closed area among the two adjacent halved points is determined The intersection of the target vector line and the target closed area makes the operation result more accurate.
- Step S15 determining a relationship between two end points of the target vector line and the target closed area, an intersection of the target vector line and the target closed area, and a vector line deletion range to determine a part of the line on the target vector line to be deleted.
- the vector line deletion range determination For each target vector line, after determining the intersection of the target vector line and the target closed area, according to the intersection, the relationship between the two end points of the target vector line and the target closed area, and the vector line deletion range determination The part of the target vector line that needs to be deleted.
- the intersection of the target vector line and the target closed area is determined by calculating the positional relationship between the finite equal point and the target closed area, which is simple and computationally inefficient.
- the information processing method provided by the embodiment of the present invention determines a target closed area, a vector line deletion range, and at least one target vector line. For each target vector line, the target is determined according to the relationship between the two end points of the target vector line and the target closed area. Whether there is an intersection point between the vector line and the target closed area.
- the target vector line deletion range determines whether the target vector line is a line to be deleted, and if there is an intersection point, a number from the target vector line Determining a point in the point is the intersection of the target vector line and the target closed area, so that based on the intersection, the relationship between the two end points of the target vector line and the target closed area, and the vector line deletion range determine that the target vector line needs
- the deleted part of the line because the positional relationship between the point and the closed area is the basic function of the vector drawing software, therefore, the information processing method provided by the embodiment of the invention is simple in calculation and less in computation, thereby realizing the determination by the lower computer configuration.
- Vector lines that need to be removed are simple in calculation and less in computation, thereby realizing the determination by the lower computer configuration.
- the vector line deletion range is used to determine whether the target vector line is a line to be deleted.
- the specific implementation manner may include:
- both end points of the target vector line are within the target closed area, and the vector line deletion range is within the target closed area, determine that the target vector line is a line that needs to be deleted;
- both end points of the target vector line are outside the target closed area, and the vector line deletion range is outside the target closed area, it is determined that the target vector line is a line that needs to be deleted.
- both end points of the target vector line are in the target closed area, and the vector line deletion range is outside the target closed area, it can be determined that the target vector line is a line that cannot be deleted, that is, a line that needs to be retained.
- both end points of the target vector line are outside the target closed area, and the vector line deletion range is within the target closed area, it can be determined that the target vector line is a line that cannot be deleted, that is, a line that needs to be retained.
- the relationship between the two endpoints of the target vector line and the target closed region, the intersection of the target vector line and the target closed region, and the vector line deletion range determine one of the partial lines of the target vector line that need to be deleted.
- the implementation can be:
- the target The part of the line on the underlying vector that needs to be deleted is: the line between the first endpoint and the intersection on the line of the target vector;
- the line between the first endpoint and the intersection on the target vector line is the line that needs to be deleted.
- the target vector line needs to be deleted.
- the part of the line is: the line between the second endpoint and the intersection on the target vector line.
- the line between the second end point and the intersection point on the target vector line is the line that needs to be deleted.
- the target vector line may be equally divided into several segments by a binary method.
- the target vector line can be equally divided into even segments by the dichotomy.
- the target vector line is not evenly divided into even-numbered segments, and the target vector line is evenly divided into odd-numbered segments. Therefore, in the embodiment of the present invention, the target vector lines are equally divided into several segments. It is not limited to the dichotomy, and there may be other methods of division, which are not specifically limited herein.
- the information processing method provided by the embodiment of the present invention may further include:
- each of the at least one target vector line determines the portion to be deleted, all the determined lines that need to be deleted are deleted.
- any one of the at least one target vector line (for the convenience of description, the first target vector line), if the part of the first target vector line that needs to be deleted is deleted, The remaining part of the first target vector line is taken as the target vector line, and the relationship between the two end points of the target vector line and the target closed area is determined. If only one of the two end points is in the target area, it means that if there are still some lines In the vector line deletion range, the remaining part of the first target vector line can be used as the target vector line, and divided equally into several segments again, if the first equal point of the adjacent two equal points is located in the target closed area.
- the second bisector of the two adjacent bisectors is located outside the target closed area, and one of the adjacent two bisectors is determined to be the intersection of the target vector line and the target closed area;
- the relationship between the two endpoints of the target vector line and the target closed region, the intersection of the target vector line and the target closed region, and the vector line deletion range determine the partial lines on the target vector line that need to be deleted.
- the intersection of the target vector line and the target closed area is more accurately determined by dividing the target vector line multiple times. Improve the accuracy of information processing.
- the embodiment of the present invention further provides an information processing device.
- a schematic structural diagram of the information processing device provided by the embodiment of the present invention is as shown in FIG. 2, and may include:
- the first determining module 21 is configured to determine a target closed area, a vector line deletion range, and at least one target vector line; wherein the vector line deletion range is within the target closed area or outside the target closed area;
- the first determining module 21 may select a target closed area, a vector line deletion range, and at least one target vector line according to a user.
- the first determining module 21 may trigger the display vector line deletion range option list by the user's preset operation after the user selects the target closed area and the at least one target vector line, and the user selects the vector line deletion range from the list.
- all the vector lines may have no intersection with the target closed area.
- all the vector lines may be located in the target closed area, or all the vector lines may be located outside the target closed area, or One part of the vector line is located in the closed area of the target, and the other part of the vector line is outside the closed area of the target.
- all vector lines may also intersect with the target closed area; or, in the selected at least one target vector line, some vector lines and the target closed area have intersections, and some vector lines There is no intersection with the target closed area.
- the determining module 22 is configured to determine, for each piece of the target vector line, a relationship between two end points of the target vector line and the target closed area;
- the part of the target vector line that needs to be deleted is determined line by line.
- the second determining module 23 is configured to determine, if the two end points of the target vector line are in the target closed area, or outside the target closed area, determine whether the target vector line is a line to be deleted by using a vector line deletion range;
- the third determining module 24 is configured to divide the target line into a plurality of segments even if only one end point of the two end points of the target vector line is located in the target area, if the first equal dividing point of the two adjacent equal dividing points Located in the closed area of the target, the second bisector of the two adjacent bisectors is located outside the target closed area, and one of the adjacent two bisectors is determined to be the target vector line and the target closed area.
- each target vector line For each target vector line, if only one end point of the two end points of the target vector line is located in the target area, it indicates that the target vector line has an intersection with the target closed curve. Then, according to the vector line deletion range, only a part of the target vector line can be deleted, and the intersection of the target vector line and the target closed area needs to be obtained.
- the target vector line is equally divided into several equal parts (for example, 20 equal parts, of course, the embodiment of the present invention is not limited to the target vector line.
- the average is divided into 20 equal parts, the more the division, the higher the precision.
- a point is determined from several equal points on the target vector line as the intersection of the vector line and the target closed area.
- one of the adjacent two equal points may be determined as the The intersection of the target vector line and the closed area of the target.
- the first of the two endpoints of the target vector line is within the target enclosed area and the second endpoint is outside the target closed area.
- traversing each of the bisector points on the target vector line sequentially, if the i-th bisector on the target vector line is in the target closed area, and the i+1th The aliquot is outside the target closed area, then the i-th aliquot can be determined, or the i+1 quintile is the intersection of the target vector line and the target closed area.
- the i-th bisector on the target vector line is outside the target closed area, and the i+1th The aliquot is in the target closed area, then the i-th aliquot can be determined, or the i+1 quintile is the intersection of the target vector line and the target closed area.
- the fourth determining module 25 is configured to determine, according to the relationship between the two end points of the target vector line and the target closed area, the intersection of the target vector line and the target closed area, and the vector line deletion range, the target vector line needs to be deleted. Part of the line.
- the vector line deletion range determination For each target vector line, after determining the intersection of the target vector line and the target closed area, according to the intersection, the relationship between the two end points of the target vector line and the target closed area, and the vector line deletion range determination The part of the target vector line that needs to be deleted.
- the intersection of the target vector line and the target closed area is determined by calculating the positional relationship between the finite equal point and the target closed area, which is simple and computationally inefficient.
- the information processing apparatus determines a target closed area, a vector line deletion range, and at least one target vector line. For each target vector line, the target is determined according to the relationship between the two end points of the target vector line and the target closed area. Whether there is an intersection point between the vector line and the target closed area.
- the target vector line deletion range determines whether the target vector line is a line to be deleted, and if there is an intersection point, from several equal points on the target vector line Determining a point as an intersection of the target vector line and the target closed area, so that based on the intersection, the relationship between the two end points of the target vector line and the target closed area, and the vector line deletion range determine that the target vector line needs to be deleted
- the partial line because the positional relationship between the point and the closed area is the basic function of the vector drawing software, therefore, the information processing method provided by the embodiment of the present invention is simple in calculation and small in amount of calculation, thereby realizing that the deletion needs to be performed with a lower computer configuration.
- Vector lines because the positional relationship between the point and the closed area is the basic function of the vector drawing software, therefore, the information processing method provided by the embodiment of the present invention is simple in calculation and small in amount of calculation, thereby realizing that the deletion needs to be performed with a lower computer configuration.
- a schematic structural diagram of the second determining module 23 is as shown in FIG. 3, and may include:
- the first determining unit 31 is configured to determine that the target vector line is a line that needs to be deleted if both end points of the target vector line are within the target closed area and the vector line deletion range is within the target closed area;
- the first determining unit 31 is further configured to: if both end points of the target vector line are in the target closed area, and the vector line deletion range is outside the target closed area, it may be determined that the target vector line is a line that cannot be deleted, That is, the lines that need to be preserved.
- the second determining unit 32 is configured to determine that the target vector line is a line that needs to be deleted if both end points of the target vector line are outside the target closed area and the vector line deletion range is the target closed area.
- the second determining unit 32 is further configured to: if both end points of the target vector line are outside the target closed area, and the vector line deletion range is within the target closed area, it may be determined that the target vector line is a line that cannot be deleted. That is, the lines that need to be preserved.
- a schematic structural diagram of the fourth determining module 25 is as shown in FIG. 4, and may include:
- the third determining unit 41 is configured to: if the first end point of the two end points of the target vector line is located in the target closed area, the second end point is outside the target closed area, and the deletion range of the vector line is within the target closed area, then the The part of the line on the target vector that needs to be deleted is: the line between the first end point and the intersection point on the line of the target vector;
- the line between the first endpoint and the intersection on the target vector line is the line that needs to be deleted.
- the fourth determining unit 42 is configured to: if the first end point of the two end points of the target vector line is located in the target closed area, the second end point is outside the target closed area, and the deletion range of the vector line is outside the target closed area, then the The part of the line on the target vector that needs to be deleted is: the line between the second end point on the line of the target vector and the intersection.
- the line between the second end point and the intersection point on the target vector line is the line that needs to be deleted.
- the third determining module 24 may divide the target vector line into a plurality of segments by a dichotomy.
- the target vector line can be equally divided into even segments by the dichotomy.
- the target vector line is not evenly divided into even-numbered segments, and the target vector line is evenly divided into odd-numbered segments. Therefore, in the embodiment of the present invention, the target vector lines are equally divided into several segments. It is not limited to the dichotomy, and the target vector lines can be equally divided into several segments by other division methods, which are not specifically limited herein.
- FIG. 5 another schematic structural diagram of the information processing apparatus provided by the embodiment of the present invention is as shown in FIG. 5, and may further include:
- the deleting module 51 is configured to delete all the determined lines that need to be deleted after each line in the at least one target vector line is determined to be deleted.
- the triggering determination module 22 determines the relationship between the two endpoints of the target vector line and the target closed region, if only one of the two endpoints is within the target region, If a part of the line is within the vector line deletion range, the third determining module 24 divides the remaining part of the first target vector line into a plurality of segments, if the first halving point of the adjacent two equal points is at the target In the closed area, the second of the two adjacent points is located outside the target closed area, and one of the adjacent two equal points is determined to be the intersection of the target vector line and the target closed area. ;
- the relationship between the two endpoints of the target vector line and the target closed region, the intersection of the target vector line and the target closed region, and the vector line deletion range determine the partial lines on the target vector line that need to be deleted.
- the intersection of the target vector line and the target closed area is more accurately determined by dividing the target vector line multiple times, thereby improving the precision of information processing.
- the disclosed system if present
- apparatus if present
- method may be implemented in other ways.
- the device embodiments described above are merely illustrative.
- the division of the unit is only a logical function division.
- there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
- the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
- the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Image Processing (AREA)
Abstract
一种信息处理方法及装置,包括:确定目标封闭区域、矢量线条删除范围和至少一条目标矢量线条(S11),对于每一条目标矢量线条,判断该目标矢量线条的两个端点与目标封闭区域的关系(S12),确定目标矢量线条与目标封闭区域是否存在交点,若不存在交点,通过矢量线条删除范围确定该目标矢量线条是否为需要删除的线条(S13),若存在交点,则从该目标矢量线条上的若干等分点中确定一个点为该目标矢量线条与目标封闭区域的交点,基于所确定交点、目标矢量线条的两端点与目标封闭区域的关系、及矢量线条删除范围确定目标矢量线条上需要被删除的部分线条(S15),该方法计算简单,运算量少,能以较低的计算机配置确定需要删除的矢量线条。
Description
本发明涉及图像处理技术领域,更具体地说,涉及一种信息处理方法、装置及电子设备。
在矢量绘图过程中,由于种种原因,可能要删除封闭区域(规则或不规则的封闭区域)内或封闭区域外的部分或全部线条。
发明人在实现本发明的过程中发现,现有技术中通过复杂的数学计算和图像处理方法确定需要删除的矢量线条,需要较高的计算机配置,占用计算机资源较多。
发明内容
本发明的目的是提供一种信息处理方法及装置,以通过较低的计算机配置确定需要删除的矢量线条。
为实现上述目的,本发明提供了如下技术方案:
一种信息处理方法,包括:
确定目标封闭区域、矢量线条删除范围和至少一条目标矢量线条;所述矢量线条删除范围为所述目标封闭区域内或所述目标封闭区域外;
对于每一条目标矢量线条,判断该目标矢量线条的两个端点与所述目标封闭区域的关系;
若该目标矢量线条的两个端点均在所述目标封闭区域内,或均在所述目标封闭区域外,通过所述矢量线条删除范围确定该目标矢量线条是否为需要删除的线条;
若该目标矢量线条的两个端点只有一个端点位于目标区域内,将该目标线条平均划分为若干段,若相邻的两个等分点中的第一等分点位于所述目标封闭区域内,所述相邻的两个等分点中的第二等分点位于所述目标封闭区域外,确定所述相邻两个等分点中的一个点为该目标矢量线条与所述目标封闭区域的交点;
基于该目标矢量线条的两个端点与所述目标封闭区域的关系、该目标矢量线条与目标封闭区域的交点,以及所述矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条。
上述方法,优选的,所述若该目标矢量线条的两个端点均在所述目标封闭区域内,或均在所述目标封闭区域外,通过所述矢量线条删除范围确定该目标矢量线条是否为需要删除的线条,包括:
若该目标矢量线条的两个端点均在所述目标封闭区域内,且所述矢量线条删除范围为所述目标封闭区域内,确定该目标矢量线条为需要删除的线条;
或者,
若该目标矢量线条的两个端点均在所述目标封闭区域外,且所述矢量线条删除范围为所述目标封闭区域外,确定该目标矢量线条为需要删除的线条。
上述方法,优选的,所述基于该目标矢量线条的两个端点与所述目标封闭区域的关系、该目标矢量线条与目标封闭区域的交点,以及所述矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条,包括:
若该目标矢量线条的两个端点中的第一端点位于所述目标封闭区域内,第二端点位于所述目标封闭区域外,所述矢量线条的删除范围为目标封闭区域内,则该目标矢量线条上需要被删除的部分线条为:该目标矢量线条上所述第一端点与所述交点之间的线条;
若该目标矢量线条的两个端点中的第一端点位于所述目标封闭区域内,第二端点位于所述目标封闭区域外,所述矢量线条的删除范围为目标封闭区域外,则该目标矢量线条上需要被删除的部分线条为:该目标矢量线条上所述第二端点与所述交点之间的线条。
上述方法,优选的,所述确定所述相邻两个等分点中的一个点为该目标矢量线条与所述目标封闭区域的交点,包括:
确定所述相邻两个等分点中的位于所述目标封闭区域内的点为该目标矢量线条与所述目标封闭区域的交点。
上述方法,优选的,还包括:
当所述至少一条目标矢量线条中各线条均确定完需要被删除部分后,删除所确定的所有需要被删除线条。
一种信息处理装置,包括:
第一确定模块,用于确定目标封闭区域、矢量线条删除范围和至少一条目标矢量线条;所述矢量线条删除范围为所述目标封闭区域内或所述目标封闭区域外;
判断模块,用于对于每一条目标矢量线条,判断该目标矢量线条的两个端点与所述目标封闭区域的关系;
第二确定模块,用于若该目标矢量线条的两个端点均在所述目标封闭区域内,或均在所述目标封闭区域外,通过所述矢量线条删除范围确定该目标矢量线条是否为需要删除的线条;
第三确定模块,用于若该目标矢量线条的两个端点只有一个端点位于目标区域内,将该目标线条平均划分为若干段,若相邻的两个等分点中的第一等分点位于所述目标封闭区域内,所述相邻的两个等分点中的第二等分点位于所述目标封闭区域外,确定所述相邻两个等分点中的一个点为该目标矢量线条与所述目标封闭区域的交点;
第四确定模块,用于基于该目标矢量线条的两个端点与所述目标封闭区域的关系、该目标矢量线条与目标封闭区域的交点,以及所述矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条。
上述装置,优选的,第二确定模块包括,
第一确定单元,用于若该目标矢量线条的两个端点均在所述目标封闭区域内,且所述矢量线条删除范围为所述目标封闭区域内,确定该目标矢量线条为需要删除的线条;
第二确定单元,用于若该目标矢量线条的两个端点均在所述目标封闭区域外,且所述矢量线条删除范围为所述目标封闭区域外,确定该目标矢量线条为需要删除的线条。
上述装置,优选的,所述第四确定模块包括:
第三确定单元,用于若该目标矢量线条的两个端点中的第一端点位于所述目标封闭区域内,第二端点位于所述目标封闭区域外,所述矢量线条的删除范围为目标封闭区域内,则该目标矢量线条上需要被删除的部分线条为:该目标矢量线条上所述第一端点与所述交点之间的线条;
第四确定单元,用于若该目标矢量线条的两个端点中的第一端点位于所述目标封闭区域内,第二端点位于所述目标封闭区域外,所述矢量线条的删
除范围为目标封闭区域外,则该目标矢量线条上需要被删除的部分线条为:该目标矢量线条上所述第二端点与所述交点之间的线条。
上述装置,优选的,用于确定所述相邻两个等分点中的一个点为该目标矢量线条与所述目标封闭区域的交点的第三确定模块具体用于,确定所述相邻两个等分点中的位于所述目标封闭区域内的点为该目标矢量线条与所述目标封闭区域的交点。
上述装置,优选的,还包括:
删除模块,用于当所述至少一条目标矢量线条中各线条均确定完需要被删除部分后,删除所确定的所有需要被删除线条。
通过以上方案可知,本申请提供的一种信息处理方法及装置,确定目标封闭区域、矢量线条删除范围以及至少一条目标矢量线条,对于每一条目标矢量线条,根据目标矢量线条的两个端点与目标封闭区域的关系,确定目标矢量线条与目标封闭区域是否存在交点,若不存在交点,根据矢量线条删除范围直接确定该目标矢量线条是否为需要删除的线条,若存在交点,则从该目标矢量线条上的若干等分点中确定一个点为该目标矢量线条与目标封闭区域的交点,从而基于该交点,该目标矢量线条的两个端点与目标封闭区域的关系、以及矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条,计算简单,运算量少,从而实现以较低的计算机配置确定需要删除的矢量线条。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的信息处理方法的一种实现流程图;
图2为本申请实施例提供的信息处理装置的一种结构示意图;
图3为本申请实施例提供的第二确定模块的一种结构示意图;
图4为本申请实施例提供的第四确定模块的一种结构示意图;
图5为本申请实施例提供的信息处理装置的另一种结构示意图。
说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的部分,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示的以外的顺序实施。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参阅图1,图1为本申请实施例提供的信息处理方法的一种实现流程图,可以包括:
步骤S11:确定目标封闭区域、矢量线条删除范围和至少一条目标矢量线条;所述矢量线条删除范围为所述目标封闭区域内或所述目标封闭区域外;
用户在对矢量图进行修改过程中,可能需要删除某个封闭区域内的某些线条,也可能需要删除该封闭区域外的某些线条。本发明实施例中,可以由用户选择目标封闭区域、矢量线条删除范围,以及至少一条目标矢量线条。其中,可以在用户选定目标封闭区域以及至少一条目标矢量线条后,通过用户的预设操作触发显示矢量线条删除范围选项列表,由用户从列表中选择矢量线条删除范围。
其中所选择的至少一条目标矢量线条中,可能全部矢量线条均与目标封闭区域没有交点,例如,可能全部矢量线条均位于目标封闭区域内,也可能全部矢量线条均位于目标封闭区域外,或者,一部分矢量线条位于目标封闭区域内,另一部分矢量线条位于目标封闭区域外。当然,所选择的至少一条目标矢量线条中,也可能全部矢量线条均与目标封闭区域有交点;或者,所选择的至少一条目标矢量线条中,部分矢量线条与目标封闭区域存在交点,部分矢量线条与目标封闭区域不存在交点。
步骤S12:对于每一条目标矢量线条,判断该目标矢量线条的两个端点与所述目标封闭区域的关系;
本发明实施例中,在确定目标矢量线条后,对所确定的至少一条目标矢量线条,逐线条确定该目标矢量线条需要被删除的部分。
步骤S13:若该目标矢量线条的两个端点均在目标封闭区域内,或均在目标封闭区域外,通过矢量线条删除范围确定该目标矢量线条是否为需要删除的线条;
对于每一条目标矢量线条,若该目标矢量线条的两个端点均在所述目标封闭区域内,或均在所述目标封闭区域外,说明该目标矢量线条与目标封闭区域没有交点。
此时,可以直接通过矢量线条删除范围确定该目标矢量线条是否是需要删除的线条。也就是说,通过目标矢量线条的两个端点就可以确定目标矢量线条是否是需要被删除的线条。而判断点是否在封闭区域内是通常是矢量绘图软件自带的基本功能,因此,实现简单。
步骤S14:若该目标矢量线条的两个端点只有一个端点位于目标区域内,将该目标线条平均划分为若干段,若相邻的两个等分点中的第一等分点位于所述目标封闭区域内,该相邻的两个等分点中的第二等分点位于所述目标封闭区域外,确定该相邻两个等分点中的一个点为该目标矢量线条与所述目标封闭区域的交点;
对于每一条目标矢量线条,若该目标矢量线条的两个端点只有一个端点位于目标区域内,说明目标矢量线条与目标封闭曲线存在交点。那么,根据矢量线条删除范围,只能删除该目标矢量线条的一部分,此时需要获取该目标矢量线条与目标封闭区域的交点。
本发明实施例中,为了快速获取目标矢量线条与目标封闭区域的交点,将该目标矢量线条平均划分为若干等分(如20等分,当然,本发明实施例中并不限于将目标矢量线条平均划分为20等分,划分越多,精度越高),从该目标矢量线条上的若干等分点中确定一个点为该矢量线条与目标封闭区域的交点。
可选的,可以从目标矢量线条的其中一个端点开始,对目标矢量线条上的各个等分点依次进行遍历,若目标矢量线条上相邻的两个等分点中,一个等分点在目标封闭区域内(包括该等分点在该目标封闭区域的边缘上),另
一个等分点在目标封闭区域外,则可以将该相邻的两个等分点中的其中一个点确定为该目标矢量线条与该目标封闭区域的交点。
例如,假设该目标矢量线条的两个端点中的第一端点位于目标封闭区域内,第二端点位于目标封闭区域外。可以从目标矢量线条的第一端点开始,对目标矢量线条上的各个等分点依次进行遍历,若目标矢量线条上的第i个等分点在目标封闭区域内,而第i+1个等分点在目标封闭区域外,则可以确定第i个等分点,或者,第i+1个等分点为目标矢量线条与目标封闭区域的交点。也可以从目标矢量线条的第二端点开始,对目标矢量线条上的各个等分点依次进行遍历,若目标矢量线条上的第i个等分点在目标封闭区域外,而第i+1个等分点在目标封闭区域内,则可以确定第i个等分点,或者,第i+1个等分点为目标矢量线条与目标封闭区域的交点。
优选的,可以将上述相邻的两个等分点中的位于目标封闭区域内的点确定为该目标矢量线条与所述目标封闭区域的交点。
由于等分点在该目标封闭区域的边缘上时也会将该等分点确定为在目标封闭区域内,因此,将上述相邻的两个等分点中的位于目标封闭区域内的点确定为该目标矢量线条与所述目标封闭区域的交点,使得操作结果更加精确。
步骤S15:基于该目标矢量线条的两个端点与目标封闭区域的关系、该目标矢量线条与目标封闭区域的交点,以及矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条。
对于每一条目标矢量线条,在确定该目标矢量线条与目标封闭区域的交点后,就可以依据该交点,该目标矢量线条的两个端点与所述目标封闭区域的关系,以及矢量线条删除范围确定该目标矢量线条上需要被删除的部分。
对于与目标封闭区域存在交点的目标矢量线条,通过计算有限个等分点与目标封闭区域的位置关系确定目标矢量线条与目标封闭区域的交点,实现简单,计算量少。
本发明实施例提供的信息处理方法,确定目标封闭区域、矢量线条删除范围以及至少一条目标矢量线条,对于每一条目标矢量线条,根据目标矢量线条的两个端点与目标封闭区域的关系,确定目标矢量线条与目标封闭区域是否存在交点,若不存在交点,根据矢量线条删除范围直接确定该目标矢量线条是否为需要删除的线条,若存在交点,则从该目标矢量线条上的若干等
分点中确定一个点为该目标矢量线条与目标封闭区域的交点,从而基于该交点,该目标矢量线条的两个端点与目标封闭区域的关系、以及矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条,由于点与封闭区域的位置关系是矢量绘图软件的基本功能,因此,本发明实施例提供的信息处理方法,计算简单,运算量少,从而实现以较低的计算机配置确定需要删除的矢量线条。
可选的,若该目标矢量线条的两个端点均在目标封闭区域内,或均目标封闭区域外,通过矢量线条删除范围确定该目标矢量线条是否为需要删除的线条,具体实现方式可以包括:
若该目标矢量线条的两个端点均在目标封闭区域内,且矢量线条删除范围为目标封闭区域内,确定该目标矢量线条为需要删除的线条;
或者,
若该目标矢量线条的两个端点均在目标封闭区域外,且矢量线条删除范围为目标封闭区域外,确定该目标矢量线条为需要删除的线条。
若该目标矢量线条的两个端点均在目标封闭区域内,而矢量线条删除范围为目标封闭区域外,则可以确定该目标矢量线条是不能删除的线条,即需要保留的线条。
或者,
若该目标矢量线条的两个端点均在目标封闭区域外,而矢量线条删除范围为目标封闭区域内,则可以确定该目标矢量线条是不能删除的线条,即需要保留的线条。
可选的,基于该目标矢量线条的两个端点与目标封闭区域的关系、该目标矢量线条与目标封闭区域的交点,以及矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条的一种实现方式可以为:
若该目标矢量线条的两个端点中的第一端点位于目标封闭区域内,第二端点位于目标封闭区域外,矢量线条的删除范围为目标封闭区域内,则该目
标矢量线条上需要被删除的部分线条为:该目标矢量线条上第一端点与交点之间的线条;
如果矢量线条的删除范围为目标封闭区域内,则目标矢量线条上第一端点与交点之间的线条即为需要被删除的线条。
若该目标矢量线条的两个端点中的第一端点位于目标封闭区域内,第二端点位于目标封闭区域外,矢量线条的删除范围为目标封闭区域外,则该目标矢量线条上需要被删除的部分线条为:该目标矢量线条上第二端点与交点之间的线条。
如果矢量线条的删除范围为目标封闭区域外,则目标矢量线条上第二端点与交点之间的线条即为需要被删除的线条。
可选的,本发明实施例中,可以通过二分法将目标矢量线条平均划分为若干段。通过二分法可以将目标矢量线条平均划分为偶数段。当然,本发明实施例中,并不限于将目标矢量线条平均划分为偶数段,还可以将目标矢量线条平均划分为奇数段,因此,本发明实施例中,对目标矢量线条平均划分为若干段并不局限于二分法,还可以有其它划分方法,这里不做具体限定。
可选的,本发明实施例提供的信息处理方法进一步可以包括:
当上述至少一条目标矢量线条中各线条均确定完需要被删除部分后,删除所确定的所有需要被删除线条。
进一步的,对于上述至少一条目标矢量线条中的任意一条目标矢量线条(为叙述方便,记为第一目标矢量线条),若将第一目标矢量线条上所确定的需要被删除部分删除后,可以将第一目标矢量线条的剩余部分作为目标矢量线条,并判断该目标矢量线条的两个端点与目标封闭区域的关系,若两个端点中只有一个端点在目标区域内,说明若还有部分线条在矢量线条删除范围内,则可以将第一目标矢量线条的剩余部分作为目标矢量线条,再次平均划分为若干段,若相邻的两个等分点中的第一等分点位于目标封闭区域内,该相邻的两个等分点中的第二等分点位于目标封闭区域外,确定该相邻两个等分点中的一个点为该目标矢量线条与目标封闭区域的交点;
基于该目标矢量线条的两个端点与目标封闭区域的关系、该目标矢量线条与目标封闭区域的交点,以及矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条。
也就是说,本发明实施例中,通过多次对目标矢量线条划分的方式更精确地确定目标矢量线条与目标封闭区域的交点。提高了信息处理的精度。
与方法实施例相对应,本发明实施例还提供一种信息处理装置,本发明实施例提供的信息处理装置的一种结构示意图如图2所示,可以包括:
第一确定模块21,判断模块22,第二确定模块23,第三确定模块24和第四确定模块25;其中,
第一确定模块21用于确定目标封闭区域、矢量线条删除范围和至少一条目标矢量线条;其中矢量线条删除范围为目标封闭区域内或目标封闭区域外;
用户在对矢量图进行修改过程中,可能需要删除某个封闭区域内的某些线条,也可能需要删除该封闭区域外的某些线条。本发明实施例中,第一确定模块21可以根据用户选择目标封闭区域、矢量线条删除范围,以及至少一条目标矢量线条。其中,第一确定模块21可以在用户选定目标封闭区域以及至少一条目标矢量线条后,通过用户的预设操作触发显示矢量线条删除范围选项列表,由用户从列表中选择矢量线条删除范围。
其中所选择的至少一条目标矢量线条中,可能全部矢量线条均与目标封闭区域没有交点,例如,可能全部矢量线条均位于目标封闭区域内,也可能全部矢量线条均位于目标封闭区域外,或者,一部分矢量线条位于目标封闭区域内,另一部分矢量线条位于目标封闭区域外。当然,所选择的至少一条目标矢量线条中,也可能全部矢量线条均与目标封闭区域有交点;或者,所选择的至少一条目标矢量线条中,部分矢量线条与目标封闭区域存在交点,部分矢量线条与目标封闭区域不存在交点。
判断模块22用于对于每一条目标矢量线条,判断该目标矢量线条的两个端点与目标封闭区域的关系;
本发明实施例中,在确定目标矢量线条后,对所确定的至少一条目标矢量线条,逐线条确定该目标矢量线条需要被删除的部分。
第二确定模块23用于若该目标矢量线条的两个端点均在目标封闭区域内,或均在目标封闭区域外,通过矢量线条删除范围确定该目标矢量线条是否为需要删除的线条;
对于每一条目标矢量线条,若该目标矢量线条的两个端点均在所述目标封闭区域内,或均在所述目标封闭区域外,说明该目标矢量线条与目标封闭区域没有交点。
此时,可以直接通过矢量线条删除范围确定该目标矢量线条是否是需要删除的线条。也就是说,通过目标矢量线条的两个端点就可以确定目标矢量线条是否是需要被删除的线条。而判断点是否在封闭区域内是通常是矢量绘图软件自带的基本功能,因此,实现简单。
第三确定模块24用于若该目标矢量线条的两个端点只有一个端点位于目标区域内,将该目标线条平均划分为若干段,若相邻的两个等分点中的第一等分点位于目标封闭区域内,相邻的两个等分点中的第二等分点位于目标封闭区域外,确定该相邻两个等分点中的一个点为该目标矢量线条与目标封闭区域的交点;
对于每一条目标矢量线条,若该目标矢量线条的两个端点只有一个端点位于目标区域内,说明目标矢量线条与目标封闭曲线存在交点。那么,根据矢量线条删除范围,只能删除该目标矢量线条的一部分,此时需要获取该目标矢量线条与目标封闭区域的交点。
本发明实施例中,为了快速获取目标矢量线条与目标封闭区域的交点,将该目标矢量线条平均划分为若干等分(如20等分,当然,本发明实施例中并不限于将目标矢量线条平均划分为20等分,划分越多,精度越高),从该目标矢量线条上的若干等分点中确定一个点为该矢量线条与目标封闭区域的交点。
可选的,可以从目标矢量线条的其中一个端点开始,对目标矢量线条上的各个等分点依次进行遍历,若目标矢量线条上相邻的两个等分点中,一个等分点在目标封闭区域内(包括该等分点在该目标封闭区域的边缘上),另一个等分点在目标封闭区域外,则可以将该相邻的两个等分点中的其中一个点确定为该目标矢量线条与该目标封闭区域的交点。
例如,假设该目标矢量线条的两个端点中的第一端点位于目标封闭区域内,第二端点位于目标封闭区域外。可以从目标矢量线条的第一端点开始,对目标矢量线条上的各个等分点依次进行遍历,若目标矢量线条上的第i个等分点在目标封闭区域内,而第i+1个等分点在目标封闭区域外,则可以确定第i个等分点,或者,第i+1个等分点为目标矢量线条与目标封闭区域的交点。也可以从目标矢量线条的第二端点开始,对目标矢量线条上的各个等分点依次进行遍历,若目标矢量线条上的第i个等分点在目标封闭区域外,而第i+1个等分点在目标封闭区域内,则可以确定第i个等分点,或者,第i+1个等分点为目标矢量线条与目标封闭区域的交点。
第四确定模块25用于基于该目标矢量线条的两个端点与所述目标封闭区域的关系、该目标矢量线条与目标封闭区域的交点,以及矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条。
对于每一条目标矢量线条,在确定该目标矢量线条与目标封闭区域的交点后,就可以依据该交点,该目标矢量线条的两个端点与所述目标封闭区域的关系,以及矢量线条删除范围确定该目标矢量线条上需要被删除的部分。
对于与目标封闭区域存在交点的目标矢量线条,通过计算有限个等分点与目标封闭区域的位置关系确定目标矢量线条与目标封闭区域的交点,实现简单,计算量少。
本发明实施例提供的信息处理装置,确定目标封闭区域、矢量线条删除范围以及至少一条目标矢量线条,对于每一条目标矢量线条,根据目标矢量线条的两个端点与目标封闭区域的关系,确定目标矢量线条与目标封闭区域是否存在交点,若不存在交点,根据矢量线条删除范围直接确定该目标矢量线条是否为需要删除的线条,若存在交点,则从该目标矢量线条上的若干等分点中确定一个点为该目标矢量线条与目标封闭区域的交点,从而基于该交点,该目标矢量线条的两个端点与目标封闭区域的关系、以及矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条,由于点与封闭区域的位置关系是矢量绘图软件的基本功能,因此,本发明实施例提供的信息处理方法,计算简单,运算量少,从而实现以较低的计算机配置确定需要删除的矢量线条。
可选的,第二确定模块23的一种结构示意图如图3所示,可以包括:
第一确定单元31和第二确定单元32;其中,
第一确定单元31用于若该目标矢量线条的两个端点均在目标封闭区域内,且矢量线条删除范围为目标封闭区域内,确定该目标矢量线条为需要删除的线条;
第一确定单元31还可以用于,若该目标矢量线条的两个端点均在目标封闭区域内,而矢量线条删除范围为目标封闭区域外,则可以确定该目标矢量线条是不能删除的线条,即需要保留的线条。
第二确定单元32用于若该目标矢量线条的两个端点均在目标封闭区域外,且矢量线条删除范围为目标封闭区域外,确定该目标矢量线条为需要删除的线条。
第二确定单元32还可以用于,若该目标矢量线条的两个端点均在目标封闭区域外,而矢量线条删除范围为目标封闭区域内,则可以确定该目标矢量线条是不能删除的线条,即需要保留的线条。
可选的,第四确定模块25的一种结构示意图如图4所示,可以包括:
第三确定单元41和第四确定单元42;其中,
第三确定单元41用于若该目标矢量线条的两个端点中的第一端点位于目标封闭区域内,第二端点位于目标封闭区域外,矢量线条的删除范围为目标封闭区域内,则该目标矢量线条上需要被删除的部分线条为:该目标矢量线条上第一端点与所述交点之间的线条;
如果矢量线条的删除范围为目标封闭区域内,则目标矢量线条上第一端点与交点之间的线条即为需要被删除的线条。
第四确定单元42用于若该目标矢量线条的两个端点中的第一端点位于目标封闭区域内,第二端点位于目标封闭区域外,矢量线条的删除范围为目标封闭区域外,则该目标矢量线条上需要被删除的部分线条为:该目标矢量线条上第二端点与所述交点之间的线条。
如果矢量线条的删除范围为目标封闭区域外,则目标矢量线条上第二端点与交点之间的线条即为需要被删除的线条。
可选的,本发明实施例中,第三确定模块24可以通过二分法将目标矢量线条平均划分为若干段。通过二分法可以将目标矢量线条平均划分为偶数段。当然,本发明实施例中,并不限于将目标矢量线条平均划分为偶数段,还可以将目标矢量线条平均划分为奇数段,因此,本发明实施例中,对目标矢量线条平均划分为若干段并不局限于二分法,还可以通过其它划分方法将目标矢量线条平均划分为若干段,这里不做具体限定。
可选的,在图2所示实施例的基础上,本发明实施例提供的信息处理装置的另一种结构示意图如图5所示,还可以包括:
删除模块51,用于当上述至少一条目标矢量线条中各线条均确定完需要被删除部分后,删除所确定的所有需要被删除线条。
可选的,对于上述至少一条目标矢量线条中的任意一条目标矢量线条(为叙述方便,记为第一目标矢量线条),若将第一目标矢量线条上所确定的需要被删除部分删除后,可以将第一目标矢量线条的剩余部分作为目标矢量线条,并触发判断模块22判断该目标矢量线条的两个端点与目标封闭区域的关系,若两个端点中只有一个端点在目标区域内,说明还有部分线条在矢量线条删除范围内,则第三确定模块24再次将第一目标矢量线条剩余部分平均划分为若干段,若相邻的两个等分点中的第一等分点位于目标封闭区域内,该相邻的两个等分点中的第二等分点位于目标封闭区域外,确定该相邻两个等分点中的一个点为该目标矢量线条与目标封闭区域的交点;
基于该目标矢量线条的两个端点与目标封闭区域的关系、该目标矢量线条与目标封闭区域的交点,以及矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条。
也就是说,本发明实施例中,通过多次对目标矢量线条划分的方式更精确地确定目标矢量线条与目标封闭区域的交点,提高了信息处理的精度。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特
定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统(若存在)、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统(若存在)、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。
Claims (10)
- 一种信息处理方法,其特征在于,包括:确定目标封闭区域、矢量线条删除范围和至少一条目标矢量线条;所述矢量线条删除范围为所述目标封闭区域内或所述目标封闭区域外;对于每一条目标矢量线条,判断该目标矢量线条的两个端点与所述目标封闭区域的关系;若该目标矢量线条的两个端点均在所述目标封闭区域内,或均在所述目标封闭区域外,通过所述矢量线条删除范围确定该目标矢量线条是否为需要删除的线条;若该目标矢量线条的两个端点只有一个端点位于目标区域内,将该目标线条平均划分为若干段,若相邻的两个等分点中的第一等分点位于所述目标封闭区域内,所述相邻的两个等分点中的第二等分点位于所述目标封闭区域外,确定所述相邻两个等分点中的一个点为该目标矢量线条与所述目标封闭区域的交点;基于该目标矢量线条的两个端点与所述目标封闭区域的关系、该目标矢量线条与目标封闭区域的交点,以及所述矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条。
- 根据权利要求1所述的方法,其特征在于,所述若该目标矢量线条的两个端点均在所述目标封闭区域内,或均在所述目标封闭区域外,通过所述矢量线条删除范围确定该目标矢量线条是否为需要删除的线条,包括:若该目标矢量线条的两个端点均在所述目标封闭区域内,且所述矢量线条删除范围为所述目标封闭区域内,确定该目标矢量线条为需要删除的线条;或者,若该目标矢量线条的两个端点均在所述目标封闭区域外,且所述矢量线条删除范围为所述目标封闭区域外,确定该目标矢量线条为需要删除的线条。
- 根据权利要求1所述的方法,其特征在于,所述基于该目标矢量线条的两个端点与所述目标封闭区域的关系、该目标矢量线条与目标封闭区域的交点,以及所述矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条,包括:若该目标矢量线条的两个端点中的第一端点位于所述目标封闭区域内,第二端点位于所述目标封闭区域外,所述矢量线条的删除范围为目标封闭区域内,则该目标矢量线条上需要被删除的部分线条为:该目标矢量线条上所述第一端点与所述交点之间的线条;若该目标矢量线条的两个端点中的第一端点位于所述目标封闭区域内,第二端点位于所述目标封闭区域外,所述矢量线条的删除范围为目标封闭区域外,则该目标矢量线条上需要被删除的部分线条为:该目标矢量线条上所述第二端点与所述交点之间的线条。
- 根据权利要求1-3任意一项所述的方法,其特征在于,所述确定所述相邻两个等分点中的一个点为该目标矢量线条与所述目标封闭区域的交点,包括:确定所述相邻两个等分点中的位于所述目标封闭区域内的点为该目标矢量线条与所述目标封闭区域的交点。
- 根据权利要求1所述的方法,其特征在于,还包括:当所述至少一条目标矢量线条中各线条均确定完需要被删除部分后,删除所确定的所有需要被删除线条。
- 一种信息处理装置,其特征在于,包括:第一确定模块,用于确定目标封闭区域、矢量线条删除范围和至少一条目标矢量线条;所述矢量线条删除范围为所述目标封闭区域内或所述目标封闭区域外;判断模块,用于对于每一条目标矢量线条,判断该目标矢量线条的两个端点与所述目标封闭区域的关系;第二确定模块,用于若该目标矢量线条的两个端点均在所述目标封闭区域内,或均在所述目标封闭区域外,通过所述矢量线条删除范围确定该目标矢量线条是否为需要删除的线条;第三确定模块,用于若该目标矢量线条的两个端点只有一个端点位于目标区域内,将该目标线条平均划分为若干段,若相邻的两个等分点中的第一等分点位于所述目标封闭区域内,所述相邻的两个等分点中的第二等分点位于所述目标封闭区域外,确定所述相邻两个等分点中的一个点为该目标矢量线条与所述目标封闭区域的交点;第四确定模块,用于基于该目标矢量线条的两个端点与所述目标封闭区域的关系、该目标矢量线条与目标封闭区域的交点,以及所述矢量线条删除范围确定该目标矢量线条上需要被删除的部分线条。
- 根据权利要求6所述的装置,其特征在于,第二确定模块包括,第一确定单元,用于若该目标矢量线条的两个端点均在所述目标封闭区域内,且所述矢量线条删除范围为所述目标封闭区域内,确定该目标矢量线条为需要删除的线条;第二确定单元,用于若该目标矢量线条的两个端点均在所述目标封闭区域外,且所述矢量线条删除范围为所述目标封闭区域外,确定该目标矢量线条为需要删除的线条。
- 根据权利要求6所述的装置,其特征在于,所述第四确定模块包括:第三确定单元,用于若该目标矢量线条的两个端点中的第一端点位于所述目标封闭区域内,第二端点位于所述目标封闭区域外,所述矢量线条的删除范围为目标封闭区域内,则该目标矢量线条上需要被删除的部分线条为:该目标矢量线条上所述第一端点与所述交点之间的线条;第四确定单元,用于若该目标矢量线条的两个端点中的第一端点位于所述目标封闭区域内,第二端点位于所述目标封闭区域外,所述矢量线条的删除范围为目标封闭区域外,则该目标矢量线条上需要被删除的部分线条为:该目标矢量线条上所述第二端点与所述交点之间的线条。
- 根据权利要求6-8任意一项所述的装置,其特征在于,用于确定所述相邻两个等分点中的一个点为该目标矢量线条与所述目标封闭区域的交点的第三确定模块具体用于,确定所述相邻两个等分点中的位于所述目标封闭区域内的点为该目标矢量线条与所述目标封闭区域的交点。
- 根据权利要求6所述的装置,其特征在于,还包括:删除模块,用于当所述至少一条目标矢量线条中各线条均确定完需要被删除部分后,删除所确定的所有需要被删除线条。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510968316.4 | 2015-12-18 | ||
| CN201510968316.4A CN105574907B (zh) | 2015-12-18 | 2015-12-18 | 信息处理方法及装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017101454A1 true WO2017101454A1 (zh) | 2017-06-22 |
Family
ID=55884994
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/092174 Ceased WO2017101454A1 (zh) | 2015-12-18 | 2016-07-28 | 信息处理方法及装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105574907B (zh) |
| WO (1) | WO2017101454A1 (zh) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105574907B (zh) * | 2015-12-18 | 2019-02-01 | 广州视睿电子科技有限公司 | 信息处理方法及装置 |
| CN110458920B (zh) * | 2018-05-08 | 2021-09-21 | 杭州海康威视数字技术股份有限公司 | 一种笔迹擦除方法及装置 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002063586A (ja) * | 2000-08-23 | 2002-02-28 | Casio Comput Co Ltd | オブジェクト編集装置 |
| CN104123737A (zh) * | 2014-07-15 | 2014-10-29 | 沈颖 | 判断点在多边形区域内部、外部或边界上的包容性测试方法 |
| CN104537701A (zh) * | 2015-01-22 | 2015-04-22 | 江苏中威科技软件系统有限公司 | 矢量线条操作方法 |
| CN105574907A (zh) * | 2015-12-18 | 2016-05-11 | 广州视睿电子科技有限公司 | 信息处理方法及装置 |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| FR2646256A1 (fr) * | 1989-04-24 | 1990-10-26 | Digital Equipment Int | Procede pour realiser des dessins a l'aide d'un ordinateur |
| JP2005234610A (ja) * | 2001-05-07 | 2005-09-02 | T Five:Kk | 手書き入力図形編集システム |
| CN101477694B (zh) * | 2008-12-02 | 2011-07-27 | 广东威创视讯科技股份有限公司 | 笔迹擦除的方法及装置 |
| CN101609560B (zh) * | 2009-07-16 | 2011-09-14 | 广东威创视讯科技股份有限公司 | 一种擦除笔迹的方法 |
| CN102566862B (zh) * | 2010-12-21 | 2014-08-27 | 汉王科技股份有限公司 | 交互式电子白板中几何图形的擦除方法和装置 |
| CN103578553B (zh) * | 2013-10-14 | 2016-03-30 | 江苏敏行信息技术有限公司 | 一种矢量线型快速擦除方法 |
-
2015
- 2015-12-18 CN CN201510968316.4A patent/CN105574907B/zh active Active
-
2016
- 2016-07-28 WO PCT/CN2016/092174 patent/WO2017101454A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002063586A (ja) * | 2000-08-23 | 2002-02-28 | Casio Comput Co Ltd | オブジェクト編集装置 |
| CN104123737A (zh) * | 2014-07-15 | 2014-10-29 | 沈颖 | 判断点在多边形区域内部、外部或边界上的包容性测试方法 |
| CN104537701A (zh) * | 2015-01-22 | 2015-04-22 | 江苏中威科技软件系统有限公司 | 矢量线条操作方法 |
| CN105574907A (zh) * | 2015-12-18 | 2016-05-11 | 广州视睿电子科技有限公司 | 信息处理方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105574907A (zh) | 2016-05-11 |
| CN105574907B (zh) | 2019-02-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108140050B (zh) | 一种使用布隆过滤器过滤文件的方法及装置 | |
| CN107704202B (zh) | 一种数据快速读写的方法和装置 | |
| US11887350B2 (en) | Some automated and semi-automated tools for linear feature extraction in two and three dimensions | |
| CN107636727A (zh) | 一种目标检测的方法及装置 | |
| US9342867B2 (en) | Apparatus and method for reconstructing super-resolution three-dimensional image from depth image | |
| US20170323149A1 (en) | Rotation invariant object detection | |
| WO2018072336A1 (zh) | 一种线段擦除方法和装置 | |
| CN110458920A (zh) | 一种笔迹擦除方法及装置 | |
| US9710963B2 (en) | Primitive fitting apparatus and method using point cloud | |
| US11017593B2 (en) | Automated registration of three-dimensional vectors to three-dimensional linear features in remotely-sensed data | |
| WO2017101454A1 (zh) | 信息处理方法及装置 | |
| CN114565879A (zh) | 特征融合方法及装置、视频抖动消除方法及装置 | |
| CN109829678B (zh) | 一种回滚处理方法、装置以及电子设备 | |
| CN111768353B (zh) | 一种三维模型的孔洞填补方法及装置 | |
| CN107993239A (zh) | 一种计算单目图像的深度次序的方法和装置 | |
| US11068739B1 (en) | Method and system for comparison of object contours | |
| CN104573132B (zh) | 歌曲查找方法及装置 | |
| US9785724B2 (en) | Secondary queue for index process | |
| TW201737128A (zh) | 資料管控的方法及系統 | |
| CN107924574B (zh) | 针对分组对象的智能翻转操作 | |
| CN114201271A (zh) | 节点确定方法、装置、计算机设备、存储介质 | |
| US20130293543A1 (en) | Image processing apparatus and method | |
| JP2020525963A (ja) | メディア特徴の比較方法及び装置 | |
| Lakemond et al. | Resection‐Intersection Bundle Adjustment Revisited | |
| US20160171699A1 (en) | Automated registration of three-dimensional vectors to three-dimensional linear features in remotely-sensed data |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16874515 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16874515 Country of ref document: EP Kind code of ref document: A1 |