介绍
在v-rep中设置图像传感器,c++客户端读取图像传感器图像
v-rep
v-rep中添加vision_sensor(注意不是camera,camera好像不能读,用同样的代码)
调整分辨率
c++client
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <iostream>
#include <process.h>
#include <Windows.h>
using namespace std;
#include <time.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
extern "C" {
#include "extApi.h"
}
int main()
{
int clientID = simxStart("127.0.0.1", 19997, true, true, 5000, 5);
if (clientID != -1)
{
printf("success");
}
else
{
printf("error");
}
simxStartSimul