Class OpenCVRectangleWrapper
- java.lang.Object
-
- science.aist.imaging.api.domain.wrapper.AbstractRectangleWrapper<org.opencv.core.Rect,org.opencv.core.Point>
-
- science.aist.imaging.opencv.imageprocessing.wrapper.OpenCVRectangleWrapper
-
- All Implemented Interfaces:
RectangleWrapper<org.opencv.core.Rect,org.opencv.core.Point>
public class OpenCVRectangleWrapper extends AbstractRectangleWrapper<org.opencv.core.Rect,org.opencv.core.Point>
OpenCV Implementation of the RectangleWrapper
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Field Summary
-
Fields inherited from class science.aist.imaging.api.domain.wrapper.AbstractRectangleWrapper
rectangle
-
-
Constructor Summary
Constructors Constructor Description OpenCVRectangleWrapper(double topLeftPointX, double topLeftPointY, double bottomRightPointX, double bottomRightPointY)
OpenCVRectangleWrapper(org.opencv.core.Point topLeftPoint, org.opencv.core.Point bottomRightPoint)
OpenCVRectangleWrapper(org.opencv.core.Rect rectangle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.opencv.core.Rect
buildRectangle(double topLeftPointX, double topLeftPointY, double bottomRightPointX, double bottomRightPointY)
Method to create a new rectangle from to given points (defined by the x and y coordinates)protected org.opencv.core.Rect
buildRectangle(org.opencv.core.Point topLeftPoint, org.opencv.core.Point bottomRightPoint)
Method to create a new rectangle from to given pointsPoint2Wrapper<org.opencv.core.Point>
getBottomRightPoint()
Point2Wrapper<org.opencv.core.Point>
getCenterPoint()
double
getHeight()
Point2Wrapper<org.opencv.core.Point>
getTopLeftPoint()
double
getWidth()
-
Methods inherited from class science.aist.imaging.api.domain.wrapper.AbstractRectangleWrapper
getRectangle, setRectangle
-
-
-
-
Constructor Detail
-
OpenCVRectangleWrapper
public OpenCVRectangleWrapper(org.opencv.core.Rect rectangle)
-
OpenCVRectangleWrapper
public OpenCVRectangleWrapper(org.opencv.core.Point topLeftPoint, org.opencv.core.Point bottomRightPoint)
-
OpenCVRectangleWrapper
public OpenCVRectangleWrapper(double topLeftPointX, double topLeftPointY, double bottomRightPointX, double bottomRightPointY)
-
-
Method Detail
-
buildRectangle
protected org.opencv.core.Rect buildRectangle(org.opencv.core.Point topLeftPoint, org.opencv.core.Point bottomRightPoint)
Method to create a new rectangle from to given points- Overrides:
buildRectangle
in classAbstractRectangleWrapper<org.opencv.core.Rect,org.opencv.core.Point>
- Parameters:
topLeftPoint
- Top left point of the rectanglebottomRightPoint
- Bottom right point of the rectangle- Returns:
- The created rectangle
-
buildRectangle
protected org.opencv.core.Rect buildRectangle(double topLeftPointX, double topLeftPointY, double bottomRightPointX, double bottomRightPointY)
Method to create a new rectangle from to given points (defined by the x and y coordinates)- Overrides:
buildRectangle
in classAbstractRectangleWrapper<org.opencv.core.Rect,org.opencv.core.Point>
- Parameters:
topLeftPointX
- x-Coordinate of the Top left point of the rectangletopLeftPointY
- y-Coordinate of the Top left point of the rectanglebottomRightPointX
- x-Coordinate of the Bottom Right point of the rectanglebottomRightPointY
- y-Coordinate of the Bottom Right point of the rectangle- Returns:
- The created rectangle
-
getTopLeftPoint
public Point2Wrapper<org.opencv.core.Point> getTopLeftPoint()
- Returns:
- The top left corner point of the rectangle
-
getBottomRightPoint
public Point2Wrapper<org.opencv.core.Point> getBottomRightPoint()
- Returns:
- The bottom right corner point of the rectangle
-
getCenterPoint
public Point2Wrapper<org.opencv.core.Point> getCenterPoint()
- Returns:
- The center corner point of the rectangle
-
getWidth
public double getWidth()
- Returns:
- The width of the rectangle
-
getHeight
public double getHeight()
- Returns:
- The height of the rectangle
-
-