CN110246173B - Method and device for judging shape area - Google Patents

Method and device for judging shape area Download PDF

Info

Publication number
CN110246173B
CN110246173B CN201810923879.5A CN201810923879A CN110246173B CN 110246173 B CN110246173 B CN 110246173B CN 201810923879 A CN201810923879 A CN 201810923879A CN 110246173 B CN110246173 B CN 110246173B
Authority
CN
China
Prior art keywords
trend
pixel point
sign
area
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810923879.5A
Other languages
Chinese (zh)
Other versions
CN110246173A (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201810923879.5A priority Critical patent/CN110246173B/en
Publication of CN110246173A publication Critical patent/CN110246173A/en
Application granted granted Critical
Publication of CN110246173B publication Critical patent/CN110246173B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

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

Abstract

The invention discloses a method and a device for judging a shape area, which are used for solving the problems that the method for judging the shape area is not applicable to any polygonal area and the calculation complexity is too high in the prior art. In the embodiment of the invention, the pixel point at the initial boundary position and the pixel point at the final boundary position of the region are determined according to the trend sign, and the pixel points between the pixel point at the initial boundary position and the pixel point at the final boundary position of the region except the pixel points at the shape boundary of the region are used as the pixel points in the region. Because the pixel points positioned at the boundary of the area shape are processed based on the set direction, the method and the device are applicable to the area of any polygon, and the pixel points in the area in the set direction can be obtained by determining the pixel points at the initial boundary position and the pixel points at the end boundary position of the area in the same set direction only according to the trend marks of the pixel points positioned at the boundary of the area shape, so that the calculation complexity is reduced.

Description

Method and device for judging shape area
Technical Field
The present invention relates to the field of image technology, and in particular, to a method and apparatus for determining a shape region.
Background
With the progressive development of image technology, region recognition technology is gradually applied to various devices, and when performing object recognition, it is determined whether a recognized object is within a set polygonal region after detecting the object by an algorithm. In the prior art, various methods can be used to determine whether the identified target is in the set polygonal area, such as an area and determination method, a ray method, an included angle and determination method, and the like.
The ray method is to judge the number of intersection points of rays from a target point and a set polygon, and if the number of intersection points is odd, the rays are judged to be in the set polygon area; if the number of the intersection points is even, the intersection points are indicated to be outside the set polygonal area; the area and judgment method is to judge whether the area of the triangle formed by the target point and each side of the polygon is equal to the polygon, if so, the triangle is judged to be inside the polygon, otherwise, the triangle is judged to be outside the polygon; the included angle and judging method is to judge whether the included angle between the target point and all sides of the polygon is 360 degrees, if 360 degrees, the included angle is inside the polygon, otherwise, the included angle is outside the polygon.
However, in a specific implementation, the ray method needs to make additional judgment on the vertex and the point on the line, and needs a large amount of computation on the area of any polygon, so that the complexity is too high; the area judgment method and the included angle judgment method require a large amount of calculation, are suitable for simple polygonal areas, and are not suitable for any polygonal areas.
In summary, the method for determining the shape region in the prior art is not applicable to any polygonal region, and the computational complexity is too high.
Disclosure of Invention
The invention provides a method and a device for judging a shape area, which are used for solving the problems that the method for judging the shape area is not applicable to any polygonal area and the calculation complexity is too high in the prior art.
According to the first aspect, according to trend marks of pixel points positioned on the boundary of the area shape, determining the pixel points at the initial boundary position and the end boundary position of the area in the same setting direction; taking the pixel points except the pixel points positioned at the shape boundary of the region between the pixel points at the start boundary position and the pixel points at the end boundary position of the region in the same setting direction as the pixel points in the region;
the trend sign of the pixel point is determined by the change of the reference trend value of the pixel point and the reference trend value of the adjacent pixel point in the trend direction, wherein the trend direction is different from the set direction.
In the implementation of the invention, the pixel points positioned at the boundary of the area shape are processed based on the set direction, so that the method is not only applicable to any polygonal area, but also the pixel points in the area in the set direction can be obtained by determining the pixel points at the initial boundary position and the pixel points at the final boundary position of the area in the same set direction according to the trend marks of the pixel points positioned at the boundary of the area shape, thereby reducing the calculation complexity.
In a specific implementation, when determining the pixel points of the initial boundary position of the region in the same setting direction, taking the pixel point corresponding to the first trend sign as the change trend sign in the setting direction as a target pixel point, wherein the change trend sign is used for indicating that the reference trend value of the corresponding pixel point and the reference trend value of the adjacent pixel point are increased or decreased in the trend direction;
and determining the first pixel point corresponding to the trend mark which is the same as the trend mark corresponding to the target pixel point in the same setting direction as the pixel point at the initial boundary position of the region.
However, after a pixel point corresponding to a first trend sign in a setting direction is taken as a target pixel point, and before a pixel point corresponding to a first trend sign identical to the trend sign corresponding to the target pixel point in the same setting direction is taken as a pixel point at an initial boundary position of an area, if a specific pixel point exists in the setting direction, the target pixel point is discarded, and a pixel point corresponding to a next trend sign in the setting direction is taken as a target pixel point;
the specific pixel points are pixel points corresponding to trend marks which are mutually offset with the trend marks of the target pixel points in the same setting direction; if one change trend indicator indicates an increase and the other change trend indicator indicates a decrease, the two change trend indicators cancel.
In the implementation of the invention, the pixel point at the initial boundary position of the region in the same setting direction is determined only according to the trend sign of the pixel point at the boundary of the region shape, so that the calculation complexity is further reduced.
In a specific implementation, when determining the pixel points of the region end boundary position in the same setting direction, the pixel point corresponding to the change trend mark is required to be used as the target pixel point, wherein the first trend mark behind the pixel points of the region start boundary position in the setting direction is the change trend mark; the change trend mark is used for indicating that the reference trend value of the corresponding pixel point and the reference trend value of the adjacent pixel point are increased or decreased in the trend direction;
and determining the first pixel point corresponding to the trend mark which is the same as the trend mark corresponding to the target pixel point in the same setting direction as the pixel point at the end boundary position of the region.
However, after a pixel point, which corresponds to a first trend sign and is the change trend sign, behind a pixel point located at the initial boundary position of an area in the set direction is taken as a target pixel point, a pixel point, which corresponds to a first trend sign and is the same as the trend sign corresponding to the target pixel point in the same set direction, is determined to be taken as a pixel point located at the end boundary position of the area, if a specific pixel point exists in the set direction, the target pixel point is discarded, and a pixel point, which corresponds to the next trend sign in the set direction and is the change trend sign, is taken as the target pixel point;
The specific pixel points are pixel points corresponding to trend marks which are mutually offset with the trend marks of the target pixel points in the same setting direction; if one change trend indicator indicates an increase and the other change trend indicator indicates a decrease, the two change trend indicators cancel.
In the implementation of the invention, the pixel points at the end boundary position of the region in the same setting direction can be determined only according to the trend marks of the pixel points at the shape boundary of the region, so that the calculation complexity is further reduced.
In a second aspect, an embodiment of the present invention provides an apparatus for determining a shape area, including: at least one processing unit and at least one storage unit, wherein the storage unit stores program code that, when executed by the processing unit, causes the processing unit to perform the following process:
determining a pixel point of an area starting boundary position and a pixel point of an area ending boundary position in the same setting direction according to a trend mark of the pixel point positioned at an area shape boundary, wherein the trend mark of the pixel point is determined by the change of a reference trend value of the pixel point and a reference trend value of an adjacent pixel point in a trend direction, and the trend direction is different from the setting direction; and taking the pixels except the pixels positioned at the area shape boundary between the pixels positioned at the area starting boundary position and the pixels positioned at the area ending boundary position in the same setting direction as the pixels in the area.
In a specific implementation, the processing unit is specifically configured to:
taking a pixel point corresponding to a first trend mark as a change trend mark in a set direction as a target pixel point, wherein the change trend mark is used for indicating that a reference trend value of the corresponding pixel point and a reference trend value of an adjacent pixel point are increased or decreased in the trend direction;
and determining the first pixel point corresponding to the trend mark which is the same as the trend mark corresponding to the target pixel point in the same setting direction as the pixel point at the initial boundary position of the region.
In a specific implementation, the processing unit is further configured to:
after the pixel point corresponding to the first trend mark in the setting direction is the change trend mark is used as a target pixel point, and before the pixel point corresponding to the first trend mark which is the same as the trend mark corresponding to the target pixel point in the same setting direction is used as the pixel point at the initial boundary position of the region, if a specific pixel point exists in the setting direction, discarding the target pixel point, wherein the specific pixel point is the pixel point corresponding to the trend mark which is mutually offset with the trend mark of the target pixel point in the same setting direction; if one change trend sign indicates an increase and the other change trend sign indicates a decrease, the two change trend signs counteract;
And taking the pixel point corresponding to the next trend mark in the setting direction as the change trend mark as a target pixel point.
In a specific implementation, the processing unit is specifically configured to:
taking a pixel point corresponding to a first trend sign which is behind the pixel point at the initial boundary position of the region in the set direction as a change trend sign as a target pixel point; the change trend mark is used for indicating that the reference trend value of the corresponding pixel point and the reference trend value of the adjacent pixel point are increased or decreased in the trend direction; and determining the first pixel point corresponding to the trend mark which is the same as the trend mark corresponding to the target pixel point in the same setting direction as the pixel point at the end boundary position of the region.
In a specific implementation, the processing unit is further configured to:
after the pixel point, which corresponds to the first trend sign and is located at the initial boundary position of the area in the set direction, is regarded as the target pixel point, and the pixel point, which corresponds to the first trend sign and is located at the final boundary position of the area in the same set direction, is regarded as the target pixel point, if a specific pixel point exists in the set direction, the target pixel point is discarded, and the pixel point, which corresponds to the next trend sign in the set direction and is located at the change trend sign, is regarded as the target pixel point.
The specific pixel points are pixel points corresponding to trend marks which are mutually offset with the trend marks of the target pixel points in the same setting direction; if one change trend indicator indicates an increase and the other change trend indicator indicates a decrease, the two change trend indicators cancel.
The technical effects caused by any implementation manner of the second aspect may be referred to the technical effects caused by the implementation manner of the first aspect, which are not described herein.
These and other aspects of the application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it will be apparent that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a method for determining a shape region according to an embodiment of the present application;
FIG. 2 is a schematic diagram of pixel points located at the boundary of a region shape according to an embodiment of the present application;
FIG. 3 is a schematic diagram of trend markers of pixel points located at boundaries of a region shape according to an embodiment of the present invention;
FIG. 4 is a schematic view of a median direction setting in an embodiment of the invention;
FIG. 5 is a flowchart of a method for determining a shape region according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an apparatus for determining a shape area according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another apparatus for determining a shape area according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention can be applied to an application scene of target detection, and in the prior art, whether the detected pixel points are in the area range or not is judged by adopting an area and judgment method, a ray method, an included angle and judgment method and the like.
However, in a specific implementation, the ray method needs to make additional judgment on the vertex and the point on the line, and needs a large amount of computation on the area of any polygon, so that the complexity is too high; the area judgment method and the included angle judgment method require a large amount of calculation, are suitable for simple polygonal areas, and are not suitable for any polygonal areas.
Compared with the problems existing in the prior art, the embodiment of the invention further improves the method for judging whether the detected pixel points are in the set area range. In the embodiment of the invention, the pixel points positioned at the boundary of the area shape are processed based on the set direction, so that whether the detected pixel points are positioned in the area formed by any polygon can be judged, and the pixel points in the area in the set direction can be obtained by determining the pixel points at the initial boundary position and the pixel points at the final boundary position of the area in the same set direction only according to the trend marks of the pixel points positioned at the boundary of the area shape, thereby reducing the calculation complexity.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, an embodiment of the present invention provides a method for determining a shape area, including:
step 100, determining a pixel point at an area start boundary position and a pixel point at an area end boundary position in the same setting direction according to a trend mark of a pixel point at an area shape boundary, wherein the trend mark of the pixel point is determined by the change of a reference trend value of the pixel point and a reference trend value of an adjacent pixel point in a trend direction, and the trend direction is different from the setting direction;
and 101, taking the pixels except the pixels positioned at the area shape boundary between the pixels positioned at the area starting boundary position and the pixels positioned at the area ending boundary position in the same setting direction as the pixels in the area.
In the embodiment of the invention, the pixel point of the region start boundary position and the pixel point of the region end boundary position in the same setting direction are determined according to the trend sign, and the pixel points between the pixel point of the region start boundary position and the pixel point of the region end boundary position in the same setting direction except the pixel point positioned at the region shape boundary are taken as the pixel points in the region. Because the pixel points positioned at the boundary of the area shape are processed based on the set direction, the method and the device are suitable for the area of any polygon, and the pixel points in the area in the set direction can be obtained by determining the pixel points at the initial boundary position and the end boundary position of the area in the same set direction according to the trend marks of the pixel points positioned at the boundary of the area shape, so that the calculation complexity is reduced.
The method of judging the shape area is described in detail below.
After receiving the pixel points positioned at the boundary of the area shape, determining the trend sign of the pixel points at the boundary of the area shape through the change of the reference trend value of the pixel points and the reference trend value of the adjacent pixel points in the trend direction.
For example, according to the coordinate points of the pixel points located at the boundary of the area shape, the coordinate value of the Y axis of the pixel point is used as a reference trend value, the trend direction is set to be clockwise, at this time, the coordinate value of the Y axis of each pixel point is compared with the coordinate value of the Y axis of the last pixel point in the clockwise direction to obtain a trend sign of the pixel point, and the coordinate value of the Y axis of each pixel point is compared with the coordinate value of the Y axis of the next pixel point in the clockwise direction to obtain another trend sign of the pixel point.
Further alternatively, after comparing the coordinate value of the Y axis of each pixel point with the coordinate value of the Y axis of the pixel point in the clockwise direction, different trend marks may be set according to different obtained results.
For example, after comparing the coordinate value of the Y axis of each pixel point with the coordinate value of the Y axis of the pixel point in the clockwise direction, if the coordinate value of the Y axis is increased, the trend flag is set as a positive trend flag; if the coordinate value of the Y axis is reduced, setting the trend sign as a negative trend sign; if the coordinate value of the Y axis is unchanged, the trend sign is set to be zero trend sign.
Further alternatively, a trend flag indicating that the reference trend value of the corresponding pixel point and the reference trend value of the adjacent pixel point increase or decrease in the trend direction may be used as the change trend flag, such as the positive trend flag and the negative trend flag in the above example.
What needs to be explained here is: the above-mentioned naming of the trend sign determined by the change of the reference trend value of the pixel point and the reference trend value of the adjacent pixel point in the trend direction, such as the negative trend sign, is only illustrative, and a specific naming name may be set by itself, which is not limited in the embodiment of the present invention, and the Y-axis coordinate value is set as the reference trend value and the trend direction is set as the clockwise direction, which is also illustrative, and the embodiment of the present invention may also be set as the counter-clockwise direction, for example, using the X-axis coordinate value as the reference trend value.
Correspondingly, after the trend marks of the pixel points positioned at the area shape boundary are determined, the pixel points at the area start boundary position and the pixel points at the area end boundary position in the same setting direction are determined according to the determined trend marks of the pixel points positioned at the area shape boundary. Wherein the trend direction is perpendicular to the set direction.
For example, if the coordinate point on the Y axis is used as the reference trend value, the trend direction of the reference trend value is the direction on the Y axis, and in this case, the setting direction needs to be set to the X axis direction perpendicular to the Y axis.
Further, an alternative embodiment of determining the pixel point of the initial boundary position of the region in the same setting direction is as follows:
taking a pixel point corresponding to a first trend sign which is behind the pixel point at the initial boundary position of the region in the set direction as a change trend sign as a target pixel point;
and determining a pixel point corresponding to a trend mark, which is the same as the trend mark corresponding to the target pixel point, of the first pixel point in the same setting direction as the pixel point at the initial boundary position of the region, wherein the change trend mark is used for indicating that the reference trend value of the corresponding pixel point and the reference trend value of the adjacent pixel point are increased or decreased in the trend direction.
For example, in a specific implementation, the direction is set to be the X-axis direction, at this time, a trend flag of a pixel point in the X-axis direction needs to be scanned to determine a first trend flag, if a first positive trend flag appears, at this time, the pixel point corresponding to the positive trend flag is taken as a target pixel point, then, scanning is continuously performed on the trend flag of the pixel point after the target pixel point in the X-axis direction until the pixel point corresponding to the position where the first positive trend flag appears is found again, at this time, the pixel point is taken as the pixel point at the initial boundary position of the region.
However, after the pixel point corresponding to the first trend sign in the setting direction as the change trend sign is set as the target pixel point, there is a possibility that a specific pixel point exists in the setting direction before the pixel point corresponding to the first trend sign identical to the trend sign corresponding to the target pixel point in the same setting direction is set as the pixel point at the region start boundary position.
Wherein, the specific pixel point is a pixel point corresponding to a trend sign which counteracts the trend sign of the target pixel point in the same setting direction, and the counteraction of the two change trend signs refers to: one trend indicator indicates an increase and the other trend indicator indicates a decrease, where the two trend indicators cancel, e.g., the positive trend indicator and the negative trend indicator cancel each other.
That is, if the change trend indicator corresponding to the determined target pixel point indicates an increase, but a change trend indicator indicating a decrease appears in the same setting direction, the pixel point corresponding to the change trend indicator indicating the decrease is the specific pixel point.
When a specific pixel point appears, the determined target pixel point needs to be abandoned, and the pixel point corresponding to the trend sign which is the next trend sign in the setting direction is taken as the target pixel point.
For example, the trend mark of the pixel point in the X-axis direction is scanned, a first positive trend mark appears, at this time, the pixel point corresponding to the positive trend mark is used as a target pixel point, then the trend mark of the pixel point after the target pixel point in the X-axis direction is continuously scanned, a trend mark of one pixel point appears as a negative trend mark, at this time, the determined target pixel point needs to be discarded, and the scanning is continuously performed until the pixel point corresponding to the position where the first change trend mark appears is found again, at this time, the pixel point is used as the target pixel point.
After determining the pixel point at the initial boundary position of the area, the pixel point at the final boundary position of the area in the same setting direction needs to be determined according to the trend sign of the pixel point at the boundary of the shape of the area, and an optional implementation manner is as follows:
taking a pixel point corresponding to a first trend sign which is behind the pixel point at the initial boundary position of the region in the set direction as a change trend sign as a target pixel point; the change trend sign is used for indicating that the reference trend value of the corresponding pixel point and the reference trend value of the adjacent pixel point are increased or decreased in the trend direction.
Correspondingly, determining the pixel point corresponding to the trend sign identical to the trend sign corresponding to the target pixel point in the first trend sign in the same setting direction as the pixel point at the end boundary position of the region.
For example, scanning trend marks of the pixels after the pixels located at the initial boundary position of the region in the X-axis direction, and taking the pixel corresponding to the positive trend mark as a target pixel at the moment, and then continuing scanning trend marks of the pixels after the target pixel in the X-axis direction until the pixel corresponding to the position where the first positive trend mark appears is found again, and taking the pixel as the pixel located at the end boundary position of the region at the moment.
However, after a pixel point whose first trend sign is corresponding to a change trend sign after a pixel point located at an area start boundary position in the setting direction is set as a target pixel point, a specific pixel point may exist in the setting direction before a pixel point corresponding to a trend sign identical to the trend sign corresponding to the target pixel point, which is first in the same setting direction, is set as a pixel point located at an area start boundary position.
Wherein, the specific pixel point is a pixel point corresponding to a trend sign which counteracts the trend sign of the target pixel point in the same setting direction, and the counteraction of the two change trend signs refers to: one trend indicator indicates an increase and the other trend indicator indicates a decrease, where the two trend indicators cancel, e.g., the positive trend indicator and the negative trend indicator cancel each other.
That is, if the change trend indicator corresponding to the determined target pixel point indicates an increase, but a change trend indicator indicating a decrease appears in the same setting direction, the pixel point corresponding to the change trend indicator indicating the decrease is the specific pixel point.
When a specific pixel point appears, the determined target pixel point needs to be abandoned, and the pixel point corresponding to the trend sign which is the next trend sign in the setting direction is taken as the target pixel point.
For example, scanning a trend flag of a pixel point behind a pixel point at an initial boundary position of an area in an X-axis direction, and generating a first positive trend flag, wherein the pixel point corresponding to the positive trend flag is used as a target pixel point, then, continuously scanning the trend flag of the pixel point behind the target pixel point in the X-axis direction, and generating a trend flag of a pixel point as a negative trend flag, and then, discarding the determined target pixel point, and continuously scanning until the pixel point corresponding to the position where the first change trend flag appears is found again, and taking the pixel point as the target pixel point.
And finally, taking the pixels except the pixels positioned at the area shape boundary between the pixels positioned at the area starting boundary position and the pixels positioned at the area ending boundary position in the same setting direction as the pixels in the area.
The following detailed description of embodiments of the invention is provided in connection with the accompanying drawings.
First, a canvas for storing the pixels located at the boundary of the shape of the region needs to be created, and then the pixels located at the boundary of the shape of the region are stored in the created canvas. If a canvas of 17×16 is created (width=17, height=16) stored in the two-dimensional array a [ x ] [ y ], the specific effect is shown in fig. 2, and of course the actual canvas is not so small, which is only illustrated here.
Accordingly, the trend sign of each pixel is determined by the change of the reference trend value of the pixel and the reference trend value of the adjacent pixel in the trend direction.
Referring to fig. 3, if the set reference trend value is the coordinate value of the Y axis of the pixel, the trend direction is clockwise, the trend flag is determined clockwise by taking the pixel (11, 1) as the starting point, the next pixel in the clockwise direction of the pixel (11, 1) is (10, 2), the previous pixel is (12, 1), the coordinate of the pixel (10, 2) is increased in the Y axis direction compared with the coordinate of the pixel (11, 1), and the trend flag of the pixel (11, 1) relative to the next pixel (10, 2) is determined to be the positive trend flag; the coordinate of the pixel point (12, 1) is unchanged from the coordinate of the pixel point (11, 1) in the Y-axis direction, and the trend mark of the pixel point (11, 1) relative to the pixel point (12, 1) is determined to be zero trend mark, namely, the trend mark of the pixel point (11, 1) is determined to be positive trend mark and zero trend mark; similarly, the trend marks of all the pixel points positioned at the boundary of the regional shape are determined according to the Y-axis coordinate values of the pixel points positioned at the boundary of the regional shape by adopting the same method.
After trend marks of all pixel points positioned at the area shape boundary are determined, scanning is carried out on each coordinate point in the set direction, and the pixel points positioned at the area starting boundary position and the pixel points positioned at the area ending boundary position in the same set direction are determined.
In this embodiment, since the reference trend value is the coordinate value of the Y axis of the pixel point, the setting direction needs to be set to the X axis direction. See fig. 4.
For example, the 5 th row of the Y axis is agreed to be Y5, for Y5 row scanning, a first trend sign appears as a positive trend sign when pixel points (5, 5) are scanned, then Y5 row scanning is continued until a second positive trend sign appears when pixel points (7, 5) are scanned, and at the moment, the pixel points (7, 5) corresponding to the positive trend sign are taken as the pixel points at the initial boundary positions of the region; and then continuously scanning the parallel lines 5, continuously scanning the Y5 line after the pixel point (17,5) with the first negative trend sign appears, and finding out whether the second pixel point with the negative trend sign appears or the pixel point (17,5), wherein the pixel point (17,5) is used as the pixel point at the end boundary position of the region, and the pixel points (5, 5) corresponding to all coordinate points between the pixel points (5, 5) and the pixel point (17,5), namely the pixel points (5, 5), such as the pixel points (6, 5), the pixel points (7, 5) and the like, are the pixel points in the region.
For example, the 14 th line of the Y axis is agreed to be Y14, for the Y14 line scanning, after the first trend mark appears as a positive trend mark when the pixel points (8, 14) are scanned, the parallel lines 14 are continuously scanned, the other trend mark of the pixel points (8, 14) is also a positive trend mark, and at the moment, the pixel point (8, 14) corresponding to the positive trend mark is taken as the pixel point positioned at the initial boundary position of the region;
then, continuing scanning the Y14 row, taking the pixel point (12, 14) corresponding to the first negative trend sign as a target pixel point, continuing scanning the Y14 row, taking the other trend sign of the pixel point (14, 14) as a positive trend sign, canceling the positive trend sign and the negative trend sign, discarding the target pixel point (12, 14) to continue scanning, determining the pixel point corresponding to the next negative trend sign as a pixel point (17,14), and taking the other trend sign of the pixel point (17,14) as a negative trend sign, wherein the two trend signs are the same, and taking the pixel point (17,14) at the position of the end boundary of the region and the pixel point between the pixel point (8, 14) and the pixel point (17, 14) except the pixel point positioned at the boundary of the shape of the region as the pixel point in the region, namely the pixel point (9, 14) to the pixel point (11, 14) and the pixel point (15, 14), (16, 14).
Based on the same theory, scanning the pixel points of each row in the Y-axis direction to obtain the pixel points in each row area in the Y-axis direction, and then forming the pixel points in each row area in the Y-axis direction into the pixel points in the area shape.
Based on the above description, the embodiments of the present invention provide two specific implementation manners of determining a pixel located at a start boundary position of an area and a pixel located at an end boundary position of the area.
Mode 1: example 1: assuming canvas is 17 x 16, for the Y-axis line 13 scan, trend state=0, positive trend sign +1 appears, negative trend sign-1 appears. Sequentially scanning pixel points (1, 13), pixel points (2, 13), pixel points (3, 13) until the pixel points (4, 13) acquire a positive trend mark, sequentially scanning pixel points (5, 13), pixel points (6, 13), acquiring a positive trend mark at the pixel points (7, 13), and dividing the state++ (state=1+1=2), wherein the state=2 can be divided by 2, and the pixel points (7, 13) are taken as the pixel points of the 13 th row of the Y axis and positioned at the initial boundary position of the region.
Scanning (8, 13) - (16, 13) in turn until the point (17, 13) is scanned, acquiring two negative trend signs, executing twice state++ (state=state-2=0), wherein the state is 0, and taking the pixel point (17, 13) as the pixel point of the parallel line 13 at the end boundary position of the region.
Since the state does not have a number greater than 2 in a closed interval, for other rows on the Y axis, and the like, the row of pixels corresponding to the state of 2 or-2 is used as the pixel located at the start boundary position of the region, and the parallel line of pixels corresponding to the state of 0 is used as the pixel located at the end boundary position of the region.
Mode 2: assuming canvas as 17 x 16, scanning the 13 th row of the Y axis, and enabling the variable to pass through the layer cnt=0; the trend flag taken for the last pixel in the trend direction is denoted as laststate=0, and the trend flag for the next pixel in the trend direction is denoted as nextstate=0;
sequentially scanning pixel points (1, 13), pixel points (2, 13), pixel points (3, 13) until the pixel points (4, 13) are reached, until the pixel points (4, 13), obtaining a trend sign positive trend sign taken for the last pixel point in the trend direction, sequentially scanning pixel points (5, 13) again, pixel points (6, 13), obtaining a trend sign for the next pixel point in the trend direction as a trend sign at the pixel points (7, 13), and obtaining a next state++ (next state=0+1=1), wherein the last state=next state=1, and a penetrating variable cnt++ (cnt=0+1=1); at this time, the layering variable cnt=1 is an odd number, and the pixel points (7, 13) are taken as the pixel points of the 13 th row of the Y axis, which are positioned at the initial boundary position of the region;
The laststate and the nextstate are emptied, and the steps (8, 13) - (16, 13) are sequentially scanned until the (17, 13) point is scanned, wherein the trend sign taken for the last pixel point in the trend direction and the trend sign taken for the next pixel point in the trend direction are both negative trend signs, the laststate- (laststate=0-1=1), the nextstate- (nextstate=0-1= -1), the laststate=nextstate= -1 takes the layering variable cnt++ (cnt=1+1=2), the layering variable cnt is an even number, and the pixel points (17, 13) are taken as the pixel points of which the parallel lines 13 are positioned at the end boundary positions of the region;
for other rows on the Y axis, the parallel line corresponding to the pixel point when the layer-penetrating variable cnt is odd is used as the pixel point at the initial boundary position of the region, and the row corresponding to the pixel point when the layer-penetrating variable cnt is even is used as the pixel point at the end boundary position of the region.
Further optionally, after determining the pixel points in the area shape, the pixel points in the area shape may be assigned, and the specific numerical value is not limited. After a pixel point a [ x ] [ y ] is obtained, judging whether the value of a [ x ] [ y ] is an assigned value, if so, the pixel point is in the area, and if not, the pixel point is out of the area.
For example, a pixel point in the shape of the region is assigned 1, and if the pixel point a [ x ] [ y ] of the target obtained during target detection is in the region, we only need to determine whether a [ x ] [ y ] is 1, if a [ x ] [ y ] is 1, the pixel point a [ x ] [ y ] is in the region, otherwise, the pixel point a [ x ] [ y ] is outside the region.
Furthermore, after the pixel points in the area shape are determined, whether the pixel points are in the area or not can be judged, and the judgment of the number of the pixel points of the object in the area can be found, so that the calculation is not needed to be acquired again, and the calculation complexity is further simplified.
As shown in fig. 5, based on the above description of the embodiment of the method for determining a shape area, an embodiment of the present invention provides a flowchart of the method for determining a shape area, including:
step 500, creating a canvas for the pixel points located at the boundary of the area shape, and determining coordinates of the pixel points located at the boundary of the area shape in the created canvas;
step 501, determining a trend sign of each pixel point according to the change of the reference trend value of the pixel point and the reference trend value of the adjacent pixel point in the trend direction;
step 502, scanning each coordinate point in the set direction, and determining a pixel point positioned at the initial boundary position of the region and a pixel point positioned at the final boundary position of the region in the same set direction;
Step 503, using pixels except for the pixels located at the boundary of the region shape between the pixels located at the start boundary position and the pixels located at the end boundary position of the region in the same setting direction as the pixels in the region;
step 504, assigning values to the pixel points located in the area shape;
step 505, obtaining pixel points of an object to be judged in the created canvas;
step 506, judging whether the value of the pixel point of the object to be judged in the created canvas is equal to the assigned value, if yes, step 507, otherwise, step 508;
step 507, judging that the object to be judged is in the area;
step 508, determining that the object to be determined is outside the area.
As shown in fig. 6, an embodiment of the present invention provides an apparatus for determining a shape area, including: at least one processing unit 600 and at least one storage unit 601, wherein the storage unit 601 stores program code, which when executed by the processing unit 600, causes the processing unit 600 to perform the following process:
determining a pixel point of an area starting boundary position and a pixel point of an area ending boundary position in the same setting direction according to a trend mark of the pixel point positioned at an area shape boundary, wherein the trend mark of the pixel point is determined by the change of a reference trend value of the pixel point and a reference trend value of an adjacent pixel point in a trend direction, and the trend direction is different from the setting direction; and taking the pixels except the pixels positioned at the area shape boundary between the pixels positioned at the area starting boundary position and the pixels positioned at the area ending boundary position in the same setting direction as the pixels in the area.
Optionally, the processing unit 600 is specifically configured to:
taking a pixel point corresponding to a first trend mark as a change trend mark in a set direction as a target pixel point, wherein the change trend mark is used for indicating that a reference trend value of the corresponding pixel point and a reference trend value of an adjacent pixel point are increased or decreased in the trend direction;
and determining the first pixel point corresponding to the trend mark which is the same as the trend mark corresponding to the target pixel point in the same setting direction as the pixel point at the initial boundary position of the region.
Optionally, the processing unit 600 is further configured to:
after the pixel point corresponding to the first trend mark in the setting direction is the change trend mark is used as a target pixel point, and before the pixel point corresponding to the first trend mark which is the same as the trend mark corresponding to the target pixel point in the same setting direction is used as the pixel point at the initial boundary position of the region, if a specific pixel point exists in the setting direction, discarding the target pixel point, wherein the specific pixel point is the pixel point corresponding to the trend mark which is mutually offset with the trend mark of the target pixel point in the same setting direction; if one change trend sign indicates an increase and the other change trend sign indicates a decrease, the two change trend signs counteract;
And taking the pixel point corresponding to the next trend mark in the setting direction as the change trend mark as a target pixel point.
Optionally, the processing unit 600 is specifically configured to:
taking a pixel point corresponding to a first trend sign which is behind the pixel point at the initial boundary position of the region in the set direction as a change trend sign as a target pixel point; the change trend mark is used for indicating that the reference trend value of the corresponding pixel point and the reference trend value of the adjacent pixel point are increased or decreased in the trend direction; and determining the first pixel point corresponding to the trend mark which is the same as the trend mark corresponding to the target pixel point in the same setting direction as the pixel point at the end boundary position of the region.
Optionally, the processing unit 600 is further configured to:
after the pixel point, which is located at the initial boundary position of the region in the set direction and corresponds to the first trend sign, is regarded as the change trend sign, is regarded as the target pixel point, and the pixel point, which is located at the end boundary position of the region and corresponds to the first trend sign, which is located at the same set direction and corresponds to the trend sign, is regarded as the first trend sign, which corresponds to the trend sign, is regarded as the first trend sign, is regarded as the second trend sign, and if a specific pixel point exists in the set direction, the target pixel point is discarded, wherein the specific pixel point is the pixel point, which corresponds to the trend sign, which is offset with the trend sign of the target pixel point, in the same set direction; if one change trend sign indicates an increase and the other change trend sign indicates a decrease, the two change trend signs counteract;
And taking the pixel point corresponding to the next trend mark in the setting direction as the change trend mark as a target pixel point.
As shown in fig. 7, an embodiment of the present invention provides another apparatus for determining a shape area, including:
the determining module 700 is configured to determine, according to a trend flag of a pixel located at a boundary of a shape of the region, a pixel at a start boundary position of the region and a pixel at an end boundary position of the region in the same setting direction;
the trend mark of the pixel point is determined by the change of the reference trend value of the pixel point and the reference trend value of the adjacent pixel point in the trend direction, wherein the trend direction is different from the set direction;
the execution module 701 is configured to take, as the pixels in the region, pixels other than the pixels located at the region shape boundary between the pixels at the region start boundary position and the pixels at the region end boundary position in the same setting direction.
Optionally, the determining module 700 is specifically configured to:
taking a pixel point corresponding to a first trend mark as a change trend mark in a set direction as a target pixel point, wherein the change trend mark is used for indicating that a reference trend value of the corresponding pixel point and a reference trend value of an adjacent pixel point are increased or decreased in the trend direction;
And determining the first pixel point corresponding to the trend mark which is the same as the trend mark corresponding to the target pixel point in the same setting direction as the pixel point at the initial boundary position of the region.
Optionally, the determining module 700 is further configured to:
after a pixel point corresponding to a first trend mark in a setting direction is a change trend mark is used as a target pixel point, and before a pixel point corresponding to a trend mark identical to the trend mark corresponding to the target pixel point in the first setting direction is used as a pixel point at the initial boundary position of an area, if a specific pixel point exists in the setting direction, discarding the target pixel point, wherein the specific pixel point is a pixel point corresponding to a trend mark which is mutually offset with the trend mark of the target pixel point in the same setting direction; if one change trend sign indicates an increase and the other change trend sign indicates a decrease, the two change trend signs counteract;
and taking the pixel point corresponding to the next trend mark in the setting direction as the change trend mark as a target pixel point.
Optionally, the determining module 700 is specifically configured to:
taking a pixel point corresponding to a first trend sign which is behind the pixel point at the initial boundary position of the region in the set direction as a change trend sign as a target pixel point; the change trend mark is used for indicating that the reference trend value of the corresponding pixel point and the reference trend value of the adjacent pixel point are increased or decreased in the trend direction;
And determining the first pixel point corresponding to the trend mark which is the same as the trend mark corresponding to the target pixel point in the same setting direction as the pixel point at the end boundary position of the region.
Optionally, the determining module 700 is further configured to:
after a pixel point, which is located at the initial boundary position of the region in the set direction and corresponds to a first trend sign, is regarded as a change trend sign, is regarded as a target pixel point, and a pixel point, which is located at the end boundary position of the region and corresponds to a first trend sign identical to the trend sign corresponding to the target pixel point in the same set direction, is regarded as a first trend sign, and if a specific pixel point exists in the set direction, the target pixel point is abandoned, wherein the specific pixel point is a pixel point, which is located at the end boundary position of the region and corresponds to a trend sign, which is mutually offset with the trend sign of the target pixel point in the same set direction; if one change trend sign indicates an increase and the other change trend sign indicates a decrease, the two change trend signs counteract;
and taking the pixel point corresponding to the next trend mark in the setting direction as the change trend mark as a target pixel point.
In some possible implementations, the aspects of determining a shape area provided by the embodiments of the present invention may also be implemented in the form of a program product comprising program code for causing a computer device to carry out the steps of the method of determining a shape area according to the various exemplary embodiments of the present invention as described in this specification, when the program code is run on the computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A program product for data forwarding control according to an embodiment of the present invention may employ a portable compact disc read only memory (CD-ROM) and include program code and may run on a server device. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an information transmission, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with a periodic network action system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device.
The embodiment of the application also provides a storage medium readable by computing equipment, namely content is not lost after power failure aiming at the method for judging the shape area. The storage medium has stored therein a software program comprising program code which, when executed on a computing device, implements the above aspects of determining shape regions of embodiments of the present application when read and executed by one or more processors.
The present application is described above with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and/or computer program products according to embodiments of the application. It will be understood that one block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, 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, and/or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer and/or other programmable data processing apparatus, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the present application may be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). Still further, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. In the context of the present application, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (6)

1. A method of determining a shape region, the method comprising:
receiving pixel points positioned at the boundary of the regional shape;
taking coordinate values of X axis or Y axis of the pixel points as reference trend values according to coordinate points of the pixel points positioned at the boundary of the regional shape;
among the pixel points located at the boundary of the area shape, a pixel point corresponding to a first trend sign in a set direction is taken as a first target pixel point, wherein the change trend sign is used for indicating that a reference trend value of the corresponding pixel point and a reference trend value of an adjacent pixel point are increased or decreased in a trend direction, and the set direction is perpendicular to the trend direction; setting the Y-axis coordinate value as a reference trend value, setting the trend direction as a clockwise direction, or setting the X-axis coordinate value as a reference trend value, and setting the trend direction as a counterclockwise direction;
Determining a first pixel point corresponding to a trend sign which is the same as the trend sign corresponding to the first target pixel point in the same setting direction as a pixel point at the initial boundary position of the region;
taking a pixel point corresponding to a first trend mark which is positioned behind the pixel point positioned at the initial boundary position of the area in the same setting direction as a second target pixel point, and determining a pixel point corresponding to a trend mark which is positioned at the same setting direction and is identical to the trend mark corresponding to the second target pixel point as a pixel point positioned at the end boundary position of the area;
and taking the pixel points except the pixel points positioned at the area shape boundary between the pixel points at the area start boundary position and the pixel points at the area end boundary position in the same setting direction as the pixel points in the area shape boundary.
2. The method of claim 1, wherein after the pixel point corresponding to the trend sign corresponding to the first trend sign in the set direction is set as the first target pixel point, determining the pixel point corresponding to the trend sign corresponding to the first target pixel point in the same set direction as the pixel point at the initial boundary position of the region, further comprises:
If a specific pixel point exists in the set direction, discarding the target pixel point, wherein the specific pixel point is a pixel point corresponding to a trend sign which is mutually offset with the trend sign of the target pixel point in the same set direction; if one change trend sign indicates an increase and the other change trend sign indicates a decrease, the two change trend signs counteract;
and taking the pixel point corresponding to the next trend mark in the setting direction as the change trend mark as a target pixel point.
3. The method of claim 1, wherein after the step of determining, as the second target pixel, a pixel corresponding to a first trend sign after the pixel located at the start boundary position of the area in the same setting direction is a pixel corresponding to a trend sign, determining, as before the pixel located at the end boundary position of the area, a pixel corresponding to a first trend sign identical to the trend sign corresponding to the second target pixel in the same setting direction, further comprises:
if the specific pixel points exist in the same setting direction, discarding the target pixel point, wherein the specific pixel point is a pixel point corresponding to a trend sign which is mutually offset with the trend sign of the target pixel point in the same setting direction; if one change trend sign indicates an increase and the other change trend sign indicates a decrease, the two change trend signs counteract;
And taking the pixel point corresponding to the next trend mark in the same setting direction as the change trend mark as a target pixel point.
4. An apparatus for determining a shape area, comprising: at least one processing unit and at least one storage unit, wherein the storage unit stores program code that, when executed by the processing unit, causes the processing unit to perform the following process:
receiving pixel points positioned at the boundary of the regional shape;
taking coordinate values of X axis or Y axis of the pixel points as reference trend values according to coordinate points of the pixel points positioned at the boundary of the regional shape;
among the pixel points located at the boundary of the area shape, a pixel point corresponding to a first trend sign in a set direction is taken as a first target pixel point, wherein the change trend sign is used for indicating that a reference trend value of the corresponding pixel point and a reference trend value of an adjacent pixel point are increased or decreased in a trend direction, and the set direction is perpendicular to the trend direction; setting the Y-axis coordinate value as a reference trend value, setting the trend direction as a clockwise direction, or setting the X-axis coordinate value as a reference trend value, and setting the trend direction as a counterclockwise direction;
Determining a first pixel point corresponding to a trend sign which is the same as the trend sign corresponding to the first target pixel point in the same setting direction as a pixel point at the initial boundary position of the region;
taking a pixel point corresponding to a first trend mark which is positioned behind the pixel point positioned at the initial boundary position of the area in the same setting direction as a second target pixel point, and determining a pixel point corresponding to a trend mark which is positioned at the same setting direction and is identical to the trend mark corresponding to the second target pixel point as a pixel point positioned at the end boundary position of the area;
and taking the pixel points except the pixel points positioned at the area shape boundary between the pixel points at the area start boundary position and the pixel points at the area end boundary position in the same setting direction as the pixel points in the area shape boundary.
5. The device of claim 4, wherein the processing unit is further to:
after the pixel point corresponding to the first trend mark in the setting direction is taken as a first target pixel point, and before the pixel point corresponding to the first trend mark which is the same as the trend mark corresponding to the first target pixel point in the same setting direction is taken as the pixel point at the initial boundary position of the area, if a specific pixel point exists in the setting direction, discarding the target pixel point, wherein the specific pixel point is the pixel point corresponding to the trend mark which is mutually offset with the trend mark of the target pixel point in the same setting direction; if one change trend sign indicates an increase and the other change trend sign indicates a decrease, the two change trend signs counteract;
And taking the pixel point corresponding to the next trend mark in the setting direction as the change trend mark as a target pixel point.
6. The device of claim 4, wherein the processing unit is further to:
after the pixel point, which corresponds to the first trend sign and is located at the initial boundary position of the area in the same setting direction, is regarded as the second target pixel point, and before the pixel point, which corresponds to the first trend sign and is located at the final boundary position of the area, is regarded as the pixel point, which corresponds to the first trend sign and is located at the same setting direction, is regarded as the second target pixel point, if a specific pixel point exists in the same setting direction, the target pixel point is discarded, wherein the specific pixel point is the pixel point, which corresponds to the trend sign, which is offset with the trend sign of the target pixel point, in the same setting direction; if one change trend sign indicates an increase and the other change trend sign indicates a decrease, the two change trend signs counteract;
and taking the pixel point corresponding to the next trend mark in the same setting direction as the change trend mark as a target pixel point.
CN201810923879.5A 2018-08-14 2018-08-14 Method and device for judging shape area Active CN110246173B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810923879.5A CN110246173B (en) 2018-08-14 2018-08-14 Method and device for judging shape area

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810923879.5A CN110246173B (en) 2018-08-14 2018-08-14 Method and device for judging shape area

Publications (2)

Publication Number Publication Date
CN110246173A CN110246173A (en) 2019-09-17
CN110246173B true CN110246173B (en) 2023-11-03

Family

ID=67882384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810923879.5A Active CN110246173B (en) 2018-08-14 2018-08-14 Method and device for judging shape area

Country Status (1)

Country Link
CN (1) CN110246173B (en)

Citations (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5073960A (en) * 1989-05-18 1991-12-17 Sharp Kabushiki Kaisha Image processing method using improved Bresenham algorithm in creating an outline of a figure to be painted and apparatus adopting the method
JPH11183128A (en) * 1997-12-18 1999-07-09 Toyota Central Res & Dev Lab Inc Image processor
CN1279451A (en) * 1999-07-06 2001-01-10 英业达集团(西安)电子技术有限公司 Triangular vector approximating method of digitalized character contour
US6356656B1 (en) * 1994-06-17 2002-03-12 Canon Kabushiki Kaisha Contour-information extraction apparatus and method
JP2002083304A (en) * 2000-09-08 2002-03-22 Oki Electric Ind Co Ltd Image processing device
JP2004252827A (en) * 2003-02-21 2004-09-09 Nissan Motor Co Ltd Lane recognition device
JP2008003765A (en) * 2006-06-21 2008-01-10 Namco Bandai Games Inc Image recognition device, method, and program for extracting at least one or more recognition object images from input image data, and information recording medium
CN101169869A (en) * 2006-10-24 2008-04-30 上海吉量软件科技有限公司 Bound tracking and chain code generating algorithm based on automatic machine
CN101458734A (en) * 2008-12-10 2009-06-17 大连船舶重工集团有限公司 Spraying and drawing method based on character image grating and chain code technology on workpieces
CN101739696A (en) * 2008-11-10 2010-06-16 富士通株式会社 System and method for rasterizing convex polygon
CN101764941A (en) * 2008-11-04 2010-06-30 新奥特(北京)视频技术有限公司 Method for defining pixel type of pixel space mask matrix
CN102411788A (en) * 2011-08-24 2012-04-11 复旦大学 Area filling algorithm based on four-way scan mode
CN102881028A (en) * 2012-05-22 2013-01-16 浙江大学 Method for quickly vectorizing grid digital image
CN103543394A (en) * 2013-10-27 2014-01-29 华北电力大学(保定) Discharge ultraviolet imaging quantization parameter extraction method of high-voltage electric equipment
CN103871062A (en) * 2014-03-18 2014-06-18 北京控制工程研究所 Lunar surface rock detection method based on super-pixel description
CN103914697A (en) * 2012-12-29 2014-07-09 上海联影医疗科技有限公司 Extraction method for region of interest of breast three-dimension image
CN103914824A (en) * 2012-12-31 2014-07-09 南方医科大学南方医院 Multi-target region drawing and random target region area calculating method for medical images
CN104021568A (en) * 2014-06-25 2014-09-03 山东大学 Automatic registering method of visible lights and infrared images based on polygon approximation of contour
JP2014241000A (en) * 2013-06-11 2014-12-25 富士フイルム株式会社 Outline modification device, outline modification method, and outline modification program
CN104507047A (en) * 2014-12-15 2015-04-08 福建星网锐捷网络有限公司 Method and device for acquiring POI (point of interest) areas
CN104718428A (en) * 2012-10-15 2015-06-17 株式会社日立高新技术 Pattern inspecting and measuring device and program
CN106289255A (en) * 2016-07-22 2017-01-04 云南师范大学 Based on around barrier path planning across the trajectory bearing calibration of naval vessel, land
CN106341659A (en) * 2016-09-05 2017-01-18 海信集团有限公司 Method and device for selecting key monitoring area of monitoring image
CN106683167A (en) * 2016-07-19 2017-05-17 谢鸿宇 Automatic modeling approach for high precision model of complex building
CN106875344A (en) * 2016-12-21 2017-06-20 浙江大华技术股份有限公司 A kind of light filling processing method and processing device of video image
CN107067536A (en) * 2017-04-27 2017-08-18 深圳怡化电脑股份有限公司 A kind of image boundary determines method, device, equipment and storage medium
CN108320799A (en) * 2018-03-17 2018-07-24 北京化工大学 Image analysis and recognition method for lateral flow paper strip disease diagnosis

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7146057B2 (en) * 2002-07-10 2006-12-05 Northrop Grumman Corporation System and method for image analysis using a chaincode
JP4180043B2 (en) * 2004-11-15 2008-11-12 シャープ株式会社 Three-dimensional graphic drawing processing device, image display device, three-dimensional graphic drawing processing method, control program for causing computer to execute the same, and computer-readable recording medium recording the same
US9275467B2 (en) * 2012-03-29 2016-03-01 Analog Devices, Inc. Incremental contour-extraction scheme for binary image segments
KR20140043225A (en) * 2012-09-27 2014-04-08 한국전자통신연구원 Method for providing of sign information and apparatus thereof
EP3311562A4 (en) * 2015-06-17 2018-06-20 Zhejiang Dahua Technology Co., Ltd Methods and systems for video surveillance

Patent Citations (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5073960A (en) * 1989-05-18 1991-12-17 Sharp Kabushiki Kaisha Image processing method using improved Bresenham algorithm in creating an outline of a figure to be painted and apparatus adopting the method
US6356656B1 (en) * 1994-06-17 2002-03-12 Canon Kabushiki Kaisha Contour-information extraction apparatus and method
JPH11183128A (en) * 1997-12-18 1999-07-09 Toyota Central Res & Dev Lab Inc Image processor
CN1279451A (en) * 1999-07-06 2001-01-10 英业达集团(西安)电子技术有限公司 Triangular vector approximating method of digitalized character contour
JP2002083304A (en) * 2000-09-08 2002-03-22 Oki Electric Ind Co Ltd Image processing device
JP2004252827A (en) * 2003-02-21 2004-09-09 Nissan Motor Co Ltd Lane recognition device
JP2008003765A (en) * 2006-06-21 2008-01-10 Namco Bandai Games Inc Image recognition device, method, and program for extracting at least one or more recognition object images from input image data, and information recording medium
CN101169869A (en) * 2006-10-24 2008-04-30 上海吉量软件科技有限公司 Bound tracking and chain code generating algorithm based on automatic machine
CN101764941A (en) * 2008-11-04 2010-06-30 新奥特(北京)视频技术有限公司 Method for defining pixel type of pixel space mask matrix
CN101739696A (en) * 2008-11-10 2010-06-16 富士通株式会社 System and method for rasterizing convex polygon
CN101458734A (en) * 2008-12-10 2009-06-17 大连船舶重工集团有限公司 Spraying and drawing method based on character image grating and chain code technology on workpieces
CN102411788A (en) * 2011-08-24 2012-04-11 复旦大学 Area filling algorithm based on four-way scan mode
CN102881028A (en) * 2012-05-22 2013-01-16 浙江大学 Method for quickly vectorizing grid digital image
CN104718428A (en) * 2012-10-15 2015-06-17 株式会社日立高新技术 Pattern inspecting and measuring device and program
CN103914697A (en) * 2012-12-29 2014-07-09 上海联影医疗科技有限公司 Extraction method for region of interest of breast three-dimension image
CN103914824A (en) * 2012-12-31 2014-07-09 南方医科大学南方医院 Multi-target region drawing and random target region area calculating method for medical images
JP2014241000A (en) * 2013-06-11 2014-12-25 富士フイルム株式会社 Outline modification device, outline modification method, and outline modification program
CN103543394A (en) * 2013-10-27 2014-01-29 华北电力大学(保定) Discharge ultraviolet imaging quantization parameter extraction method of high-voltage electric equipment
CN103871062A (en) * 2014-03-18 2014-06-18 北京控制工程研究所 Lunar surface rock detection method based on super-pixel description
CN104021568A (en) * 2014-06-25 2014-09-03 山东大学 Automatic registering method of visible lights and infrared images based on polygon approximation of contour
CN104507047A (en) * 2014-12-15 2015-04-08 福建星网锐捷网络有限公司 Method and device for acquiring POI (point of interest) areas
CN106683167A (en) * 2016-07-19 2017-05-17 谢鸿宇 Automatic modeling approach for high precision model of complex building
CN106289255A (en) * 2016-07-22 2017-01-04 云南师范大学 Based on around barrier path planning across the trajectory bearing calibration of naval vessel, land
CN106341659A (en) * 2016-09-05 2017-01-18 海信集团有限公司 Method and device for selecting key monitoring area of monitoring image
CN106875344A (en) * 2016-12-21 2017-06-20 浙江大华技术股份有限公司 A kind of light filling processing method and processing device of video image
CN107067536A (en) * 2017-04-27 2017-08-18 深圳怡化电脑股份有限公司 A kind of image boundary determines method, device, equipment and storage medium
CN108320799A (en) * 2018-03-17 2018-07-24 北京化工大学 Image analysis and recognition method for lateral flow paper strip disease diagnosis

Non-Patent Citations (11)

* Cited by examiner, † Cited by third party
Title
A new algorithm for dominant points detection and polygonization of digital curves;Majed Marji 等;Pattern Recognition;第36卷(第10期);2239-2251 *
A simple algorithm for detection of significant vertices for polygonal approximation of chain-coded curves;Debranjan Sarkar;Pattern Recognition Letters;第14卷(第12期);959-964 *
Edge extraction of shaft part based on combination of double threshold and shape constraint;Jia Liu 等;2017 7th IEEE International Conference on Electronics Information and Emergency Communication (ICEIEC);253-255 *
FAST corner detection in polygonal approximation of shape;Ema Rachmawati 等;2017 3rd International Conference on Science in Information Technology (ICSITech);166-170 *
一种复杂图像目标的分割与识别;王海英 等;北京理工大学学报(第02期);224-228 *
一种改进的二值图像边界跟踪与边界链码获取算法;邓仕超 等;激光与光电子学进展;第55卷(第6期);147-153 *
基于图像处理的目标面积计算方法;聂秀珍;电子制作(第20期);32 *
基于边界跟踪的区域面积计算;葛伟华 等;计算机应用与软件;第25卷(第06期);239-240、274 *
基于链码和特征形的多边形内外点判断算法;周欣 等;计算机辅助设计与图形学学报;第18卷(第9期);1317-1321 *
基于链码的部分算法研究;杨万扣;中国优秀博硕士学位论文全文数据库 (硕士) 信息科技辑;第2004年卷(第4期);I138-23 *
对 Freeman 链码分析的角点检测算法;刘相湖 等;计算机系统应用;第27卷(第4期);202-208 *

Also Published As

Publication number Publication date
CN110246173A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
CN110286387B (en) Obstacle detection method and device applied to automatic driving system and storage medium
JP6830139B2 (en) 3D data generation method, 3D data generation device, computer equipment and computer readable storage medium
CN110569699B (en) Method and device for carrying out target sampling on picture
CN113486796B (en) Unmanned vehicle position detection method, unmanned vehicle position detection device, unmanned vehicle position detection equipment, storage medium and vehicle
US11763575B2 (en) Object detection for distorted images
Hulik et al. Continuous plane detection in point-cloud data based on 3D Hough Transform
CN108629231B (en) Obstacle detection method, apparatus, device and storage medium
CN107123142B (en) Pose estimation method and device
CN110276293B (en) Lane line detection method, lane line detection device, electronic device, and storage medium
CN110263713B (en) Lane line detection method, lane line detection device, electronic device, and storage medium
US9990762B2 (en) Image processing apparatus and method
EP3968266B1 (en) Obstacle three-dimensional position acquisition method and apparatus for roadside computing device
CN110222703B (en) Image contour recognition method, device, equipment and medium
JP2018106712A (en) Fast rendering of quadrics and marking of silhouettes thereof
CN110263714B (en) Lane line detection method, lane line detection device, electronic device, and storage medium
CN114937081B (en) Internet vehicle position estimation method and device based on independent non-uniform incremental sampling
CN114998406A (en) Self-supervision multi-view depth estimation method and device
CN115496923A (en) Multi-modal fusion target detection method and device based on uncertainty perception
CN110246173B (en) Method and device for judging shape area
CN112639822B (en) Data processing method and device
CN115131225A (en) Tunnel limit determination method, device electronic equipment and storage medium
CN115937825B (en) Method and device for generating robust lane line under BEV of on-line pitch angle estimation
JP7258101B2 (en) Image stabilization method, device, electronic device, storage medium, computer program product, roadside unit and cloud control platform
US11593597B2 (en) Object detection in vehicles using cross-modality sensors
CN112068547B (en) AMCL-based robot positioning method and device and robot

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