PXCAccelerator未定义

时间:2016-01-08 16:28:15

标签: intellisense intel realsense

您好我正在尝试将外部图像加载到PXCImage对象中。我假装使用这个功能:

void LoadImageFromLocal(PXCSession* session, PXCImage **dst_img, const char * path)
{
  IplImage *image = cvLoadImage(path);
  unsigned char *rgb_data;
  int rgb_pitch = image->widthStep; // bytes between image lines

  rgb_data = (unsigned char*)image->imageData;
  PXCAccelerator * accelerator;
  session->CreateAccelerator(PXCAccelerator::ACCEL_TYPE_CPU, &accelerator);

  PXCImage::ImageInfo info;
  memset(&info, 0, sizeof(info));
  info.height = image->height;
  info.width = image->width;
  info.format = PXCImage::PIXEL_FORMAT_RGB24;

  PXCImage::ImageData data;
  memset(&data, 0, sizeof(data));
  data.format = PXCImage::PIXEL_FORMAT_RGB24;
  data.planes[0] = rgb_data;
  data.pitches[0] = rgb_pitch;

  pxcStatus sts = accelerator->CreateImage(&info, 0, &data, dst_img);
}

但是在我的代码中,PXCAccelerator类显示为未定义。我正在使用此库:#include "pxcsensemanager.h"#include "pxcemotion.h"。我有2014 RSSDK版本。我应该使用什么库来访问PXCAccelerator类?

1 个答案:

答案 0 :(得分:1)

看起来PXCAccelerator是(现已弃用的)英特尔感知计算SDK的一部分,但在英特尔实感SDK中不存在。

现在您应该使用PXCSession::CreateImage代替:

    PXCImage* CreateImage(PXCImage::ImageInfo *info, PXCImage::ImageData *data);