Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
[image] check
Browse files Browse the repository at this point in the history
  • Loading branch information
junhuanchen committed May 11, 2022
1 parent 19739d5 commit 6a6b847
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ext_modules/_maix_image/_maix_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,15 +563,15 @@ maix_image &maix_image::_draw_string(int x, int y, std::string str, double scale
return *this;
}

maix_image &maix_image::_rotate(double rotate, int adjust)
maix_image &maix_image::_rotate(double angle, int adjust)
{
if (NULL == this->_img)
{
py::print("no img");
return *this;
}
libmaix_image_t *tmp = NULL;
if (libmaix_cv_image_rotate(this->_img, rotate, adjust, &tmp) != 0)
if (libmaix_cv_image_rotate(this->_img, angle, adjust, &tmp) != 0)
{
return *this;
}
Expand Down
4 changes: 2 additions & 2 deletions ext_modules/_maix_image/py_maix_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ PYBIND11_MODULE(_maix_image, mo)
.def("draw_circle", &maix_image::_draw_circle, py::arg("x"), py::arg("y"), py::arg("radius"), py::arg("color") = std::vector<int>{127, 127, 127}, py::arg("thickness") = 1)
.def("draw_ellipse", &maix_image::_draw_ellipse, py::arg("cx"), py::arg("xy"), py::arg("rx"), py::arg("ry"), py::arg("angle"), py::arg("startAngle"), py::arg("endAngle"), py::arg("color") = std::vector<int>{127, 127, 127}, py::arg("thickness") = 1)
.def("draw_string", &maix_image::_draw_string, py::arg("x"), py::arg("y"), py::arg("str"), py::arg("scale") = 1.0, py::arg("color") = std::vector<int>{127, 127, 127}, py::arg("thickness") = 1)
.def("rotate", &maix_image::_rotate, py::arg("rotate"), py::arg("adjust") = 0)
.def("flip", &maix_image::_flip, py::arg("flip") = 0)
.def("rotate", &maix_image::_rotate, py::arg("angle"), py::arg("adjust") = 0)
.def("flip", &maix_image::_flip, py::arg("flip") = 1)
.def("convert", &maix_image::_convert, py::arg("mode") = "RGB")
.def("cut", &maix_image::_draw_crop, py::arg("x"), py::arg("y"), py::arg("w"), py::arg("h"))
.def("crop", &maix_image::_draw_crop, py::arg("x"), py::arg("y"), py::arg("w"), py::arg("h"))
Expand Down

0 comments on commit 6a6b847

Please sign in to comment.