Skip to content

Commit

Permalink
Add func comments and update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelarusso committed Oct 16, 2023
1 parent 2d28b9a commit 3685c03
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Your pull requests will be greatly appreciated!
- [ ] [checkChessboard](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
- [ ] [composeRT](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
- [ ] [computeCorrespondEpilines](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
- [ ] [convertPointsFromHomogeneous](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
- [X] [convertPointsFromHomogeneous](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
- [ ] [convertPointsHomogeneous](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
- [ ] [convertPointsToHomogeneous](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
- [ ] [correctMatches](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
Expand Down Expand Up @@ -175,7 +175,7 @@ Your pull requests will be greatly appreciated!
- [ ] [stereoCalibrate](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
- [ ] [stereoRectify](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
- [ ] [stereoRectifyUncalibrated](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
- [ ] [triangulatePoints](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
- [X] [triangulatePoints](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)
- [ ] [validateDisparity](https://docs.opencv.org/master/d9/d0c/group__calib3d.html)

- [ ] **Fisheye - WORK STARTED** The following functions still need implementation:
Expand Down
11 changes: 10 additions & 1 deletion calib3d.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,19 @@ func EstimateAffine2DWithParams(from Point2fVector, to Point2fVector, inliers Ma
return newMat(C.EstimateAffine2DWithParams(from.p, to.p, inliers.p, C.int(method), C.double(ransacReprojThreshold), C.size_t(maxIters), C.double(confidence), C.size_t(refineIters)))
}

func TriangulatePoints(projMatr1 Mat, projMatr2 Mat, projPoints1, projPoints2 Point2fVector, points4D *Mat) {
// TriangulatePoints reconstructs 3-dimensional points (in homogeneous coordinates)
// by using their observations with a stereo camera.
//
// For further details, please see:
// https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#gad3fc9a0c82b08df034234979960b778c
func TriangulatePoints(projMatr1, projMatr2 Mat, projPoints1, projPoints2 Point2fVector, points4D *Mat) {
C.TriangulatePoints(projMatr1.Ptr(), projMatr2.Ptr(), projPoints1.p, projPoints2.p, points4D.Ptr())
}

// ConvertPointsFromHomogeneous converts points from homogeneous to Euclidean space.
//
// For further details, please see:
// https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#gac42edda3a3a0f717979589fcd6ac0035
func ConvertPointsFromHomogeneous(src Mat, dst *Mat) {
C.ConvertPointsFromHomogeneous(src.Ptr(), dst.Ptr())
}
4 changes: 0 additions & 4 deletions calib3d_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,3 @@ func TestEstimateAffine2DWithParams(t *testing.T) {
t.Errorf("TestEstimateAffine2DWithParams(): unexpected rows = %v, want = %v", m.Rows(), 2)
}
}

func TestTriangulatePoints(t *testing.T) {

}
5 changes: 2 additions & 3 deletions core.go
Original file line number Diff line number Diff line change
Expand Up @@ -1537,9 +1537,8 @@ func MinMaxLoc(input Mat) (minVal, maxVal float32, minLoc, maxLoc image.Point) {
// MinMaxLocWithMask finds the global minimum and maximum in an array with a mask used to select a sub-array.
//
// For further details, please see:
// https://docs.opencv.org/trunk/d2/de8/group__core__array.html#gab473bf2eb6d14ff97e89b355dac20707
//
func MinMaxLocWithMask(input Mat, mask Mat) (minVal, maxVal float32, minLoc, maxLoc image.Point) {
// https://docs.opencv.org/4.x/d2/de8/group__core__array.html#gab473bf2eb6d14ff97e89b355dac20707
func MinMaxLocWithMask(input, mask Mat) (minVal, maxVal float32, minLoc, maxLoc image.Point) {
var cMinVal C.double
var cMaxVal C.double
var cMinLoc C.struct_Point
Expand Down

0 comments on commit 3685c03

Please sign in to comment.