MCPcopy Create free account
hub / github.com/davisking/dlib / bind_image_classes2

Function bind_image_classes2

tools/python/src/image2.cpp:565–866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563// ----------------------------------------------------------------------------------------
564
565void bind_image_classes2(py::module& m)
566{
567
568 const char* docs = "Resizes img, using bilinear interpolation, to have the indicated number of rows and columns.";
569
570
571 m.def("resize_image", &py_resize_image<uint8_t>, py::arg("img"), py::arg("rows"), py::arg("cols"));
572 m.def("resize_image", &py_resize_image<uint16_t>, py::arg("img"), py::arg("rows"), py::arg("cols"));
573 m.def("resize_image", &py_resize_image<uint32_t>, py::arg("img"), py::arg("rows"), py::arg("cols"));
574 m.def("resize_image", &py_resize_image<uint64_t>, py::arg("img"), py::arg("rows"), py::arg("cols"));
575 m.def("resize_image", &py_resize_image<int8_t>, py::arg("img"), py::arg("rows"), py::arg("cols"));
576 m.def("resize_image", &py_resize_image<int16_t>, py::arg("img"), py::arg("rows"), py::arg("cols"));
577 m.def("resize_image", &py_resize_image<int32_t>, py::arg("img"), py::arg("rows"), py::arg("cols"));
578 m.def("resize_image", &py_resize_image<int64_t>, py::arg("img"), py::arg("rows"), py::arg("cols"));
579 m.def("resize_image", &py_resize_image<float>, py::arg("img"), py::arg("rows"), py::arg("cols"));
580 m.def("resize_image", &py_resize_image<double>, docs, py::arg("img"), py::arg("rows"), py::arg("cols"));
581 m.def("resize_image", &py_resize_image<rgb_pixel>, docs, py::arg("img"), py::arg("rows"), py::arg("cols"));
582 m.def("resize_image", &py_scale_image<int8_t>, py::arg("img"), py::arg("scale"));
583 m.def("resize_image", &py_scale_image<int16_t>, py::arg("img"), py::arg("scale"));
584 m.def("resize_image", &py_scale_image<int32_t>, py::arg("img"), py::arg("scale"));
585 m.def("resize_image", &py_scale_image<int64_t>, py::arg("img"), py::arg("scale"));
586 m.def("resize_image", &py_scale_image<float>, py::arg("img"), py::arg("scale"));
587 m.def("resize_image", &py_scale_image<double>, py::arg("img"), py::arg("scale"));
588 m.def("resize_image", &py_scale_image<rgb_pixel>, py::arg("img"), py::arg("scale"),
589 "Resizes img, using bilinear interpolation, to have the new size (img rows * scale, img cols * scale)"
590 );
591
592 register_extract_image_chip(m);
593
594 m.def("insert_image_chip", &py_insert_image_chip<uint8_t>, py::arg("img"), py::arg("chip"), py::arg("chip_location"));
595 m.def("insert_image_chip", &py_insert_image_chip<uint16_t>, py::arg("img"), py::arg("chip"), py::arg("chip_location"));
596 m.def("insert_image_chip", &py_insert_image_chip<uint32_t>, py::arg("img"), py::arg("chip"), py::arg("chip_location"));
597 m.def("insert_image_chip", &py_insert_image_chip<uint64_t>, py::arg("img"), py::arg("chip"), py::arg("chip_location"));
598 m.def("insert_image_chip", &py_insert_image_chip<int8_t>, py::arg("img"), py::arg("chip"), py::arg("chip_location"));
599 m.def("insert_image_chip", &py_insert_image_chip<int16_t>, py::arg("img"), py::arg("chip"), py::arg("chip_location"));
600 m.def("insert_image_chip", &py_insert_image_chip<int32_t>, py::arg("img"), py::arg("chip"), py::arg("chip_location"));
601 m.def("insert_image_chip", &py_insert_image_chip<int64_t>, py::arg("img"), py::arg("chip"), py::arg("chip_location"));
602 m.def("insert_image_chip", &py_insert_image_chip<float>, py::arg("img"), py::arg("chip"), py::arg("chip_location"));
603 m.def("insert_image_chip", &py_insert_image_chip<double>, py::arg("img"), py::arg("chip"), py::arg("chip_location"));
604 m.def("insert_image_chip", &py_insert_image_chip<rgb_pixel>, py::arg("img"), py::arg("chip"), py::arg("chip_location"),
605 "Inserts chip into img applying the appropriate mapping using chip_location"
606"requires \n\
607 - img and chip numpy arrays that can be interpreted as images. They \n\
608 must be the same type of image as well. \n\
609 - the number of rows and columns in chip match the ones in chip_location \n\
610ensures \n\
611 - This function takes the given chip and inserts it into img using an appropriate \n\
612 mapping, computed from chip_location."
613 /*!
614 requires
615 - img and chip numpy arrays that can be interpreted as images. They
616 must be the same type of image as well.
617 - the number of rows and columns in chip match the ones in chip_location.
618 ensures
619 - This function takes the given chip and inserts it into img using an appropriate
620 mapping, computed from chip_location.
621 !*/
622 );

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls 2

argClass · 0.50

Tested by

no test coverage detected