DLib:draw_rectangle()中要使用的输入参数
DLib: what input arguments to be used in draw_rectangle()
Dlib
:中draw_rectangle
函数中使用的这些输入参数是什么
image_type& img
const rectangle& rect
const pixel_type& val
unsigned int thickness
有人能告诉我这些参数是什么吗?我应该用什么值来在输入图像上绘制找到的地标的覆盖图以保存它。
template <
typename image_type,
typename pixel_type
>
void draw_rectangle (
image_type& img,
const rectangle& rect,
const pixel_type& val,
unsigned int thickness = 1
);
/*!
requires
- image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- pixel_traits<pixel_type> is defined
ensures
- Draws the given rectangle onto the image img. It does this by calling
draw_line() four times to draw the four sides of the rectangle.
- The rectangle is drawn with the color given by val.
- The drawn rectangle will have edges that are thickness pixels wide.
!*/
这是他们的网页上说的。这似乎很不言自明。您需要绘制一个图像,需要绘制矩形。pixel_type表示颜色;厚度是线条的厚度,默认为一个像素。
您可以在此处找到有关此库的图像的更多信息,也可以在此处的首页上阅读有关不同的pixel_type。
根据你的问题,我想说你可能想先学习更多的C++,尤其是模板,因为这个库大量使用它们。这里有很多函数,你不可能在这里问每一个函数的问题。
相关文章:
- 将输入参数作为右值引用传递?
- 是否可以在命令行中将输入参数传递给可执行文件
- 用户输入作为参数C++
- C++基于输入参数的动态代码生成
- 我想知道为什么"std::unique_ptr<int> foo(新 int)"是合法的,因为"std::<int>unique_ptr"要求输入参数类型应该是"int"?
- 如何使用输入参数作为文件的传递?
- 如何设置默认参数以防用户不输入另一个参数
- C++ 如何根据作为输入传递的参数调用一个构造函数或另一个构造函数?
- 在未显式传递参数时默认使用 lambda 的用户输入
- 在函数中使用运算符重载,在 c++ 中使用 const 类型输入参数
- 提供变量作为 MATLAB 系统命令的输入参数,以便C++可执行文件
- isPalindrome不显示输出,isPalindrome函数未使用字符串输入作为字符串参数进行测试
- 如何使输入文本文件成为构造函数参数?c++
- 函数的函数无法识别输入参数
- C++ Catch 是否有类似 NUnit 的测试用例的东西,具有多个参数/输入选项
- 具体参数输入
- 为什么在参数输入之前将计算放置在代码中时,计算不起作用
- C 函数通过指针通过参考与参数输入参数
- 将命令行参数输入文件传递给要分析的类
- 将命令作为参数输入到另一个应用程序