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

从原图片扣目标框的这部分坐标转换代码没看明白,希望大佬解答一下 #38

Open
MerlinBu opened this issue Feb 23, 2023 · 3 comments

Comments

@MerlinBu
Copy link

FeatureTensor.cpp 113-118行
rc.x -= (rc.height * 0.5 - rc.width) * 0.5; //为什么x坐标这么改?
rc.width = rc.height * 0.5; //为什么width要取height的一半?
rc.x = (rc.x >= 0 ? rc.x : 0);
rc.y = (rc.y >= 0 ? rc.y : 0);
rc.width = (rc.x + rc.width <= img.cols ? rc.width : (img.cols - rc.x));
rc.height = (rc.y + rc.height <= img.rows ? rc.height : (img.rows - rc.y));

@pango99
Copy link

pango99 commented Jul 17, 2024

对啊,这段代码是什么意思?我实在看不懂

@Li-Chang-Yi
Copy link

同问

@MerlinBu
Copy link
Author

MerlinBu commented Dec 4, 2024 via email

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

No branches or pull requests

3 participants