Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,16 @@ public static void updateVideoProp(CvSource video, SimCameraProperties prop) {
* through a Mat, the point (0,0) actually represents the center of the top-left pixel and not the
* actual top-left corner.
*
* <p>Order of corners returned is: [BL, BR, TR, TL]
*
* @param size Size of image
*/
public static Point[] getImageCorners(Size size) {
return new Point[] {
new Point(-0.5, -0.5),
new Point(size.width - 0.5, -0.5),
new Point(-0.5, size.height - 0.5),
new Point(size.width - 0.5, size.height - 0.5),
new Point(-0.5, size.height - 0.5)
new Point(size.width - 0.5, -0.5),
new Point(-0.5, -0.5)
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ static std::unordered_map<int, cv::Mat> LoadAprilTagImages() {

static std::vector<cv::Point2f> GetImageCorners(const cv::Size& size) {
std::vector<cv::Point2f> retVal{};
retVal.emplace_back(cv::Point2f{-0.5f, -0.5f});
retVal.emplace_back(cv::Point2f{size.width - 0.5f, -0.5f});
retVal.emplace_back(cv::Point2f{size.width - 0.5f, size.height - 0.5f});
retVal.emplace_back(cv::Point2f{-0.5f, size.height - 0.5f});
retVal.emplace_back(cv::Point2f{size.width - 0.5f, size.height - 0.5f});
retVal.emplace_back(cv::Point2f{size.width - 0.5f, -0.5f});
retVal.emplace_back(cv::Point2f{-0.5f, -0.5f});
return retVal;
}

Expand Down
Loading