Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

New odometry Pipeline#20755

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
alalek merged 87 commits intoopencv:5.xfromDumDereDum:new_odometry
Dec 2, 2021
Merged

New odometry Pipeline#20755

alalek merged 87 commits intoopencv:5.xfromDumDereDum:new_odometry
Dec 2, 2021

Conversation

@DumDereDum
Copy link
Member

@DumDereDumDumDereDum commentedSep 27, 2021
edited
Loading

Pull Request Readiness Checklist

See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@DumDereDumDumDereDum marked this pull request as draftSeptember 27, 2021 10:14

intestimateConstraint(int fromSubmapId,int toSubmapId,int& inliers, Affine3f& inlierPose);
boolupdateMap(int _frameId,Ptr<OdometryFrame> _frame);
boolupdateMap(int _frameId, OdometryFrame _frame);
Copy link
Member

Choose a reason for hiding this comment

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

_

Avoid using of underscored parameters in public headers.
They are part of documentation and bindings.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

done


virtualvoidintegrate(InputArray _depth,float depthFactor,const cv::Matx33f& intrinsics,constint currframeId);
virtualvoidraycast(const cv::Affine3f& cameraPose,const cv::Matx33f& intrinsics, cv::Size frameSize,
virtualvoidraycast(Odometry icp,const cv::Affine3f& cameraPose,const cv::Matx33f& intrinsics, cv::Size frameSize,
Copy link
Member

Choose a reason for hiding this comment

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

Still no reference.

Check all other methods and other types, including

bool compute(OdometryFrame srcFrame, OdometryFrame dstFrame, OutputArray Rt);

Comment on lines 7 to 10
#include<iostream>
#include<opencv2/core.hpp>
#include<opencv2/core/ocl.hpp>
#include<opencv2/core/mat.hpp>
Copy link
Member

Choose a reason for hiding this comment

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

iostream

Avoid using of that header (I left detailed comment about that on this month - check project conversations in email).
Use logging.

core.hpp
mat.hpp

Not needed, included by default.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

done

{
public:
Impl() {};
virtual~Impl() {};
Copy link
Member

Choose a reason for hiding this comment

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

redundant semicolon

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

done

Comment on lines 22 to 37
virtualvoidsetImage(InputArray image) = 0;
virtualvoidgetImage(OutputArray image) = 0;
virtualvoidgetGrayImage(OutputArray image) = 0;
virtualvoidsetDepth(InputArray depth) = 0;
virtualvoidgetDepth(OutputArray depth) = 0;
virtualvoidsetMask(InputArray mask) = 0;
virtualvoidgetMask(OutputArray mask) = 0;
virtualvoidsetNormals(InputArray normals) = 0;
virtualvoidgetNormals(OutputArray normals) = 0;
virtualvoidsetPyramidLevel(size_t _nLevels, OdometryFramePyramidType oftype) = 0;
virtualvoidsetPyramidLevels(size_t _nLevels) = 0;
virtualsize_tgetPyramidLevels(OdometryFramePyramidType oftype) = 0;
virtualvoidsetPyramidAt(InputArray img,
OdometryFramePyramidType pyrType,size_t level) = 0;
virtualvoidgetPyramidAt(OutputArray img,
OdometryFramePyramidType pyrType,size_t level) = 0;
Copy link
Member

Choose a reason for hiding this comment

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

getters should be "const".

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

done

Comment on lines 11 to 15
const cv::Matx33f defaultCameraMatrix =
{/* fx, 0, cx*/0,0,0,
/* 0, fy, cy*/0,0,0,
/* 0, 0, 0*/0,0,0 };
const std::vector<int> defaultIterCounts = {7,7,7,10 };
Copy link
Member

Choose a reason for hiding this comment

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

avoid declaration of global objects - they slowdown library initialization.
Use class ctors / initialization on-demand instead.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

if I understood right, done

Comment on lines 17 to 20
constfloat defaultMinDepth =0.f;
constfloat defaultMaxDepth =4.f;
constfloat defaultMaxDepthDiff =0.07f;
constfloat defaultMaxPointsPart =0.07f;
Copy link
Member

Choose a reason for hiding this comment

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

local constants must be "static".

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

done

Comment on lines 303 to 310
#if SHOW_DEBUG_IMAGES
imshow("image", image);
imshow("warpedImage", warpedImage);
Mat resultImage, resultDepth;
warpFrame(image, depth, calcRvec, calcTvec, K, resultImage, resultDepth);
imshow("resultImage", resultImage);
waitKey();
waitKey(100);
#endif
Copy link
Member

Choose a reason for hiding this comment

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

BTW, there is

if (cvtest::debugLevel >= 10){    ...}

details:#18955 , use ">= 10" for UI interaction.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

done

voidOdometrySettingsImplCommon::getIterCounts(OutputArray val)const
{
DefaultSets ds;
Mat(ds.defaultIterCounts).copyTo(val);
Copy link
Member

Choose a reason for hiding this comment

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

getter implementation conflicts with setter

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

done

template<typename TMat>
void OdometryFrameImplTMat<TMat>::setPyramidAt(InputArray _img, OdometryFramePyramidType pyrType,size_t level)
{
CV_Assert(pyrType < OdometryFramePyramidType::N_PYRAMIDS);
Copy link
Member

Choose a reason for hiding this comment

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

< pyramids.size() instead of some assumed value

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

pyramids isvector<vector<TMat>> and in some cases, the levels could be different for different Pyramids.
this is the reason why I use assumed value
besides,pyramids.size() returns the number of pyramids but not levels

Copy link
Member

@alalekalalekDec 2, 2021
edited
Loading

Choose a reason for hiding this comment

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

Wrong logic.
It is simple.

Code below uses:

pyramids[pyrType]

So assumptions are:

  • pyrType >= 0
  • pyrType < pyramids.size()

We need just to check them.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I misunderstood, my bad.
I will fix now

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

done

@alalekalalek merged commit6ab4659 intoopencv:5.xDec 2, 2021
void OdometryFrameImplTMat<TMat>::setPyramidAt(InputArray _img, OdometryFramePyramidType pyrType,size_t level)
{
CV_Assert(pyrType >=0);
CV_Assert(pyrType < pyramids.size());
Copy link
Contributor

Choose a reason for hiding this comment

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

When our branch merged this part of the code, the build gave a WARNING and the logs are athttps://pullrequest.opencv.org/buildbot/builders/precommit_windows32/builds/13578/steps/compile%20release/logs/warnings%20%281%29.

Copy link
Member

Choose a reason for hiding this comment

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

CV_Assert((size_t)pyrType < pyramids.size());

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@alalek, I'll fix it on this PR or create a new one?

Copy link
Member

Choose a reason for hiding this comment

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

Nobody can fix already merged PR.
So create a new one.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@alalekalalekalalek left review comments

@savuorsavuorsavuor approved these changes

+1 more reviewer

@ruanychruanychruanych left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

@savuorsavuor

Projects

None yet

Milestone

5.0-alpha

Development

Successfully merging this pull request may close these issues.

5 participants

@DumDereDum@alalek@savuor@ruanych@asmorkalov

[8]ページ先頭

©2009-2025 Movatter.jp