使用opencv提供的背景去除算法(KNN或高斯混合模型GMM)去除背景,然后将获取的目标二值化后通过筛选目标轮廓获得目标位置。
#include
using namespace cv;
//基于移动对象的轮廓的跟踪
int main()
{
Mat frame;
bool flag = true;
VideoCapture capture;
capture.open(0);
if (!capture.isOpened())
{
printf("can not
我们使用视差效果在单个2D图像上提供3D体验,即用户可以移动其实时跟踪的面部以可视化深度效果。 通过使用修复方法,该程序可以绘制丢失的背景,该背景现在可以通过用户的移动来访问。
修复方法和大部分代码取自:
Shih3DP20, Shih, Meng-Li and Su, Shih-Yang and Kopf, Johannes and Huang, Jia-Bin, 3D Photography using Context-aware Layered Depth Inpainting, IE