小编Ala*_*lan的帖子

提取给定坐标内的像素

我是图像处理和开发的新手.我有一个图像的像素坐标.通过连接每个坐标可以得到一个三角形.我想提取给定坐标(三角形内的像素)的像素内的像素

坐标如下.

1(x,y) -> (146 , 548)
2(x,y) -> (155, 548)
3(x,y) -> (149.6 , 558.1)
Run Code Online (Sandbox Code Playgroud)

如何拍摄上面坐标入站的像素.任何帮助表示赞赏.谢谢.

c++ opencv

2
推荐指数
1
解决办法
90
查看次数

opencv 标识符“Mat”在头文件中使用时未定义

我使用的是 Visual Studio Professional 2013。在那里我使用了 opencv。我已经正确链接了所有的 opencv 库。

  1. 程序在 main.cpp 中工作(我已经测试了很多 opencv 程序)
  2. 在类中使用的同一个程序,给出未定义的错误(即使是一个简单的 mat 对象也无法在类中创建给出未定义的错误。)

我该如何解决这个问题?

请在下面找到我使用的代码(这个未定义的 Mat 问题不会出现在 main.cpp 中)

#pragma once
#include "stdafx.h"
#include <opencv2/highgui/highgui.hpp> // import no include errors
#include <opencv2/imgproc/imgproc.hpp> // import no include errors 
#include <opencv2/core/core.hpp>       // import no include errors
class DepthImage
{

public:
    DepthImage();
    ~DepthImage();
private:
    Mat image; //identifier "Mat" is undefined  
};
Run Code Online (Sandbox Code Playgroud)

c++ opencv visual-studio-2013

2
推荐指数
1
解决办法
4583
查看次数

标签 统计

c++ ×2

opencv ×2

visual-studio-2013 ×1