Merge branch 'main' into pr/point_refactor

This commit is contained in:
Vukašin Stepanović
2023-02-16 16:43:24 +00:00
132 changed files with 1048 additions and 1329 deletions

View File

@@ -203,13 +203,13 @@ impl<'a> MonochromeRectangleDetector<'_> {
}
}
} else {
return Err(Exceptions::NotFoundException(None));
return Err(Exceptions::notFound);
}
lastRange_z = range;
y += deltaY;
x += deltaX
}
Err(Exceptions::NotFoundException(None))
Err(Exceptions::notFound)
}
/**

View File

@@ -78,7 +78,7 @@ impl<'a> WhiteRectangleDetector<'_> {
|| downInit >= image.getHeight() as i32
|| rightInit >= image.getWidth() as i32
{
return Err(Exceptions::NotFoundException(None));
return Err(Exceptions::notFound);
}
Ok(WhiteRectangleDetector {
@@ -224,7 +224,7 @@ impl<'a> WhiteRectangleDetector<'_> {
}
if z.is_none() {
return Err(Exceptions::NotFoundException(None));
return Err(Exceptions::notFound);
}
let mut t: Option<Point> = None;
@@ -242,7 +242,7 @@ impl<'a> WhiteRectangleDetector<'_> {
}
if t.is_none() {
return Err(Exceptions::NotFoundException(None));
return Err(Exceptions::notFound);
}
let mut x: Option<Point> = None;
@@ -260,7 +260,7 @@ impl<'a> WhiteRectangleDetector<'_> {
}
if x.is_none() {
return Err(Exceptions::NotFoundException(None));
return Err(Exceptions::notFound);
}
let mut y: Option<Point> = None;
@@ -278,12 +278,12 @@ impl<'a> WhiteRectangleDetector<'_> {
}
if y.is_none() {
return Err(Exceptions::NotFoundException(None));
return Err(Exceptions::notFound);
}
Ok(self.center_edges(y.unwrap(), z.unwrap(), x.unwrap(), t.unwrap()))
} else {
Err(Exceptions::NotFoundException(None))
Err(Exceptions::notFound)
}
}