v-rep 入门-和c++client 图像通讯

本文介绍了如何在v-rep环境中配置vision_sensor,并通过C++客户端实现图像数据的读取。在v-rep中,作者强调了需要使用vision_sensor而非camera来获取图像,并详细说明了调整传感器分辨率的步骤。在C++客户端部分,展示了读取图像传感器数据的方法,最终得到了预期的结果。
摘要由CSDN通过智能技术生成

介绍

在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
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值