Unverified Commit b0b30d0c authored by Yue Zhou's avatar Yue Zhou Committed by GitHub
Browse files

fix bug (#1702)

parent 7df4ebed
...@@ -86,8 +86,8 @@ __device__ inline void minBoundingRect(Point *ps, int n_points, float *minbox) { ...@@ -86,8 +86,8 @@ __device__ inline void minBoundingRect(Point *ps, int n_points, float *minbox) {
float R[2][2]; float R[2][2];
float rot_points[2][MAXN]; float rot_points[2][MAXN];
R[0][0] = cos(unique_angles[i]); R[0][0] = cos(unique_angles[i]);
R[0][1] = -sin(unique_angles[i]); R[0][1] = sin(unique_angles[i]);
R[1][0] = sin(unique_angles[i]); R[1][0] = -sin(unique_angles[i]);
R[1][1] = cos(unique_angles[i]); R[1][1] = cos(unique_angles[i]);
// R x Points // R x Points
for (int m = 0; m < 2; m++) { for (int m = 0; m < 2; m++) {
...@@ -273,8 +273,8 @@ __device__ inline void Findminbox(T const *const p, T *minpoints) { ...@@ -273,8 +273,8 @@ __device__ inline void Findminbox(T const *const p, T *minpoints) {
float R[2][2]; float R[2][2];
R[0][0] = cos(angle); R[0][0] = cos(angle);
R[0][1] = -sin(angle); R[0][1] = sin(angle);
R[1][0] = sin(angle); R[1][0] = -sin(angle);
R[1][1] = cos(angle); R[1][1] = cos(angle);
minpoints[0] = xmax * R[0][0] + ymin * R[1][0]; minpoints[0] = xmax * R[0][0] + ymin * R[1][0];
......
...@@ -9,13 +9,13 @@ np_pointsets = np.asarray([[ ...@@ -9,13 +9,13 @@ np_pointsets = np.asarray([[
2.0, 1.5, 1.5 2.0, 1.5, 1.5
], ],
[ [
1.5, 1.5, 2.5, 2.5, 1.5, 2.5, 2.5, 1.5, 1.5, 1.0, 1.0, 8.0, 8.0, 1.0, 2.0, 2.0, 1.0, 1.0,
3.5, 3.5, 1.5, 2.5, 3.5, 3.5, 2.5, 2.0, 2.0 3.0, 3.0, 1.0, 2.0, 3.0, 3.0, 2.0, 1.5, 1.5
]]) ]])
expected_polygons = np.asarray( expected_polygons = np.asarray(
[[3.0000, 1.0000, 1.0000, 1.0000, 1.0000, 3.0000, 3.0000, 3.0000], [[3.0000, 1.0000, 1.0000, 1.0000, 1.0000, 3.0000, 3.0000, 3.0000],
[3.5000, 1.5000, 1.5000, 1.5000, 1.5000, 3.5000, 3.5000, 3.5000]]) [8.0, 8.0, 2.3243, 0.0541, 0.0541, 1.6757, 5.7297, 9.6216]])
@pytest.mark.skipif( @pytest.mark.skipif(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment