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

Support Tracking module #344

Merged
merged 4 commits into from May 11, 2017

Conversation

Projects
None yet
2 participants
@takuya-takeuchi
Copy link
Contributor

takuya-takeuchi commented May 5, 2017

Add elementary functions for Tracking class and unit test class.

@shimat
Copy link
Owner

shimat left a comment

ありがとうございます 🙏
私の方で直しますので、これは自分用のメモです

/// </summary>
#else
/// <summary>
/// Gets the y-coordinate of the top edge of this CvRect structure.

This comment has been minimized.

@shimat

shimat May 5, 2017

Owner

memo: s/CvRect/Rect/g

/// </summary>
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public struct Rectd : IEquatable<Rectd>

This comment has been minimized.

@shimat

shimat May 5, 2017

Owner

本家では typedef Rect_<double> Rect2d; なので合わせたいです
https://github.com/opencv/opencv/blob/master/modules/core/include/opencv2/core/types.hpp#L415

#endif
public double Right
{
get { return X + Width - 1; }

This comment has been minimized.

@shimat

shimat May 5, 2017

Owner

既存Rectのほうは諸事情あってこの実装になっていますが、doubleのRectだと奇妙に感じますね...
本家は-1しない実装なので x + width にしておくべきでした 😩 考えます。
https://github.com/opencv/opencv/blob/master/modules/core/include/opencv2/core/types.hpp#L1725

This comment has been minimized.

@takuya-takeuchi

takuya-takeuchi May 5, 2017

Contributor

既にRectfがあったので、Rectdにしました。I/Fの変更になりますが、RectfもRect2fにした方が、この際綺麗になる気がしますね。

This comment has been minimized.

@shimat

shimat May 5, 2017

Owner

👍
OpenCV2系ではintのrectしかtypedefが無く適当に名前付けたら、いつの間にか食い違ったようですね

@shimat

This comment has been minimized.

Copy link
Owner

shimat commented May 11, 2017

適当な運用で恐縮ですが、forkされたのをこちらが直すのは手間なのでマージしてから直します

@shimat shimat merged commit 8a74e32 into shimat:master May 11, 2017

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@shimat shimat added the enhancement label May 11, 2017

@takuya-takeuchi takuya-takeuchi deleted the takuya-takeuchi:feature/tracking branch May 12, 2017

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