Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions notebooks/geometry_and_monocular.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
"def translate(points, t):\n",
" pass\n",
"\n",
"translated_points = translate(points, t)"
"translated_points = translate(rotated_points, t)"
]
},
{
Expand All @@ -324,7 +324,7 @@
"outputs": [],
"source": [
"def make_homogenous(points):\n",
" return np.hstack([points, np.ones(points.shape[0])])\n",
" return np.hstack([points, np.ones(points.shape[0]).reshape((points.shape[0], 1))])\n",
"\n",
"# вставьте движение точек с помощью однородных координат сюда. отобразите результат\n",
"def move(points, rot_mat, t):\n",
Expand Down Expand Up @@ -417,7 +417,7 @@
" \n",
" def project(self, points):\n",
" if points.shape[1] == 3:\n",
" homo_pts = self.K.dot(translate(rotate(points, self.R), self.t)).T\n",
" homo_pts = self.K.dot(translate(rotate(points, self.R), self.t).T).T\n",
" elif points.shape[1] == 4:\n",
" homo_pts = self.P.dot(points.T)\n",
" else:\n",
Expand Down Expand Up @@ -580,7 +580,7 @@
" dtype='float64')\n",
"\n",
"#камера расположена немного левее начала с.к.\n",
"R_cam = np.ones((3,3), dtype='float64')\n",
"R_cam = np.identity(3, dtype='float64')\n",
"t_cam = np.array([5.956621e-02, 2.900141e-04, 2.577209e-03],\n",
" dtype='float64')\n",
"img_size = image.shape"
Expand Down