无法解决错误 'ImageGenerator'

Error 'ImageGenerator' cannot be resolve

我正在尝试以下代码但得到:

ImageGenerator cannot be resolved

我已经导入了JavaCV和OpenCV所需的库。我需要导入更多库吗?我已经搜索过了,没找到!

import java.awt.*;
import java.awt.image.*;
import java.io.*;
import java.nio.ByteBuffer;

import javax.naming.Context;

 enum Resolution {
      NORMAL, HIGH
    }


    public class KinectCapture 
    {
      private BufferedImage image = null;
      private int imWidth, imHeight;
      private int fps;

      private boolean isReleased = true;    
               // when Kinect context has been released

      // OpenNI
      private Context context;
      private ImageGenerator imageGen; **Here I am getting the error.**

      public KinectCapture()
      {  this(Resolution.NORMAL);  }

          public KinectCapture(Resolution res)
      {  configOpenNI(res); }


      private void configOpenNI(Resolution res)
      // create context and image generator
      {
        try {
          context = new Context();

          // add the NITE Licence 
          License licence = new License("PrimeSense", "0KOIk2JeIBYClPWVnMoRKn5cdY4=");   // vendor, key
          context.addLicense(licence); 

          imageGen = ImageGenerator.create(context);

我在 JavaDoc 中找不到 ImageGenerator 所以我假设你有学校给你的包或其他什么东西,那么你也必须导入它,或者你需要创建 Class ImageGenerator 在你的包中某处。

编辑:经过一些研究,我发现了这个:https://github.com/OpenNI/OpenNI/blob/master/Wrappers/OpenNI.java/src/org/openni/ImageGenerator.java