如何从图像中调整关键点
How to adjust the keypoints from the images
我们可以从背景减影图像中提取关键点吗?我从视频中提取关键点,首先减去它的背景,但它显示了运行时错误
if (! previous_frame.empty()) {
subtract(current_frame, previous_frame, predict_img);
detector.detect(predict_img, keypoint2);
if (keypoint2.size > 20) // Error
{
RetainBestKeypoints(keypoint2, 20);
}
else
{
//Want to ignore the frame , but how ?
}
代码中提到了错误,
detect()
方法输出关键点的std::vector
。因此,您应该调用keypoint2.size()
而不是不带括号的size
。
除此之外,并且假设差异的类型与关键点检测器兼容,是的,您可以(计算差异图像或背景图像上的关键点)。
相关文章:
- 为char数组调整zlib-zpipe
- 调整大小后指向元素值的指针unordered_map有效?
- 在C++中调整向量中的索引
- 哪些库可以通过Opencv调整曝光率
- 如何调整 std::vector of Eigen::MatrixXd 的大小
- Alt+Enter 在 Win32 应用中,管理大小调整和分辨率
- 在容量内调整矢量大小时的性能影响
- 将 boost::odeint 与向量类一起使用,而无需调整向量的大小
- 将摄像机调整到俯视图
- Qt 图表条形图调整大小崩溃
- 除非重新绘制大小,否则SDL_Texture在调整大小后呈现黑色
- 调整布局上的 QGraphicsView 小部件的大小
- 如何在构建链接列表时调整头、尾指针
- 如何将旧的 C 样式 #define 映射与现代C++进行调整?
- 当您在此单词中搜索单词时调整字符数组的大小?
- SDL2 调整窗口大小后如何缩放鼠标坐标?
- 如何按另一个向量的方向调整一个向量?
- 使用大小调整大小调整 wxListView 的大小
- 调整大小和复制哈希表数组中的元素
- 如何从图像中调整关键点