我们有以下线性回归:y~b0 + b1*x1 + b2*x2.我知道Matlab中的回归函数确实计算了它,但是numpy的linalg.lstsq没有(https://docs.scipy.org/doc/numpy-dev/user/numpy-for-matlab-users.html).
PyCharm告诉我imp已被弃用,所以我想知道是否有任何类似的imp.new_module for importlib.
我有图像的投资回报率,我需要创建作为图像子部分的新图像。我怎样才能做到这一点?(我想将片段制作为图像数组,而不是矩形。)
Image<Bgr, byte> img = frame.Copy();
pieces = new List<System.Drawing.Rectangle>();
int input_cell_width = img.Width / Cols;
int input_cell_height = img.Height / Rows;
System.Drawing.Rectangle old_roi = img.ROI;
for (int row = 0; row < Rows; ++row)
{
for (int col = 0; col < Cols; ++col)
{
// Get template
img.ROI = gridOuput.GetCellItemRect(row, col, new System.Drawing.Point(0, 0));
pieces.Add(img.ROI);
}
}
Run Code Online (Sandbox Code Playgroud)
谢谢。
python ×2
c# ×1
emgucv ×1
numpy ×1
python-3.x ×1
roi ×1
scikit-learn ×1
scipy ×1
statsmodels ×1