Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add func InitUndistortRectifyMap #405

Merged
merged 3 commits into from
Mar 7, 2019
Merged

Conversation

linyongzuo
Copy link
Contributor

No description provided.

@codecov-io
Copy link

codecov-io commented Feb 11, 2019

Codecov Report

Merging #405 into dev will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #405      +/-   ##
==========================================
+ Coverage   94.78%   94.85%   +0.06%     
==========================================
  Files          17       17              
  Lines        1821     1845      +24     
==========================================
+ Hits         1726     1750      +24     
  Misses         83       83              
  Partials       12       12
Impacted Files Coverage Δ
core.go 100% <100%> (ø) ⬆️
calib3d.go 100% <100%> (ø) ⬆️
imgproc.go 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66a9ff3...513b210. Read the comment docs.

@linyongzuo
Copy link
Contributor Author

@deadprogram

@@ -66,3 +66,27 @@ func FisheyeUndistortImageWithParams(distorted Mat, undistorted *Mat, k, d, knew
}
C.Fisheye_UndistortImageWithParams(distorted.Ptr(), undistorted.Ptr(), k.Ptr(), d.Ptr(), knew.Ptr(), sz)
}

// https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga7dfb72c9cf9780a347fbe3d1c47e5d5a
func InitUndistortRectifyMap(cameraMatrix Mat, distCoeffs Mat, r Mat, newCameraMatrix Mat, size image.Point, m1type int, map1 Mat, map2 Mat) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add the GoDoc compatible comment format here?

// InitUndistortRectifyMap [description of what it does...]
//
// For further details, please see:
// ([ink to the OpenCV docs, like you have now]
//

Thanks!


// remember Close the Mat object
// https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga7a6c4e032c97f03ba747966e6ad862b1
func GetOptimalNewCameraMatrixWithParams(cameraMatrix Mat, distCoeffs Mat, imageSize image.Point, alpha float64, newImgSize image.Point, centerPrincipalPoint bool) (Mat, image.Rectangle) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous comment. Thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calib3d.go Outdated
@@ -66,3 +66,33 @@ func FisheyeUndistortImageWithParams(distorted Mat, undistorted *Mat, k, d, knew
}
C.Fisheye_UndistortImageWithParams(distorted.Ptr(), undistorted.Ptr(), k.Ptr(), d.Ptr(), knew.Ptr(), sz)
}

// initUndistortRectifyMap computes the joint undistortion and rectification transformation and represents the result in the form of maps for remap
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be capitalized for GoDocs to correctly use them.

calib3d.go Outdated

// initUndistortRectifyMap computes the joint undistortion and rectification transformation and represents the result in the form of maps for remap
// For more details, please see:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cannot be a blank line for GoDocs to correctly use them.

calib3d.go Outdated
// GetOptimalNewCameraMatrixWithParams computes and returns the optimal new camera matrix based on the free scaling parameter.
// please remember Close the Mat object which returns
// For more details, please see:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also cannot be a blank line.

@deadprogram
Copy link
Member

Hi @linyongzuo thanks for the changes. I requested a couple more changee because GoDocs is somewhat strict about how it parses the comments.

@deadprogram
Copy link
Member

Thank you for the updates and contribution @linyongzuo now merging.

@deadprogram deadprogram merged commit e95a3bc into hybridgroup:dev Mar 7, 2019
@deadprogram deadprogram mentioned this pull request Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants