Skip to content

Commit

Permalink
fixed spelling errors
Browse files Browse the repository at this point in the history
Signed-off-by: samrat.thapa <[email protected]>
  • Loading branch information
SamratThapa120 committed May 22, 2024
1 parent 1d53217 commit f2fb6e8
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ TEST(GeometryTest, CalcIoUX)
roi2.width = 4;
roi2.height = 4;

double ioux = calcIoUX(roi1, roi2);
EXPECT_NEAR(ioux, 2.0 / 6.0, 1e-6);
double iou_x = calcIoUX(roi1, roi2);
EXPECT_NEAR(iou_x, 2.0 / 6.0, 1e-6);

// Non-overlapping ROIs on x-axis
roi2.x_offset = 5;

ioux = calcIoUX(roi1, roi2);
EXPECT_EQ(ioux, 0.0);
iou_x = calcIoUX(roi1, roi2);
EXPECT_EQ(iou_x, 0.0);

// Zero width ROI
roi1.width = 0;

ioux = calcIoUX(roi1, roi2);
EXPECT_EQ(ioux, 0.0);
iou_x = calcIoUX(roi1, roi2);
EXPECT_EQ(iou_x, 0.0);
}

TEST(GeometryTest, CalcIoUY)
Expand All @@ -99,20 +99,20 @@ TEST(GeometryTest, CalcIoUY)
roi2.width = 4;
roi2.height = 4;

double iouy = calcIoUY(roi1, roi2);
EXPECT_NEAR(iouy, 2.0 / 6.0, 1e-6);
double iou_y = calcIoUY(roi1, roi2);
EXPECT_NEAR(iou_y, 2.0 / 6.0, 1e-6);

// Non-overlapping ROIs on y-axis
roi2.y_offset = 5;

iouy = calcIoUY(roi1, roi2);
EXPECT_EQ(iouy, 0.0);
iou_y = calcIoUY(roi1, roi2);
EXPECT_EQ(iou_y, 0.0);

// Zero height ROI
roi1.height = 0;

iouy = calcIoUY(roi1, roi2);
EXPECT_EQ(iouy, 0.0);
iou_y = calcIoUY(roi1, roi2);
EXPECT_EQ(iou_y, 0.0);
}

int main(int argc, char ** argv)
Expand Down

0 comments on commit f2fb6e8

Please sign in to comment.