could not run the sketch (target VN failed to initialize)

edited September 2017 in Kinect

hi there, I'm running windows 10, with an AMD radeon graphics card, latest version of processing. when running my sketch i get the error message "could not run the sketch (target VN failed to initialize)" and also a windows firewall notification, that it blocks some java functions. Again, if I allow access, I still get the error. This was a fully functioning sketch before. Any idea? Thanks

Answers

  • edited September 2017
    import spout.*;
    import KinectPV2.*;
    
    PImage img;
    PGraphics canvas; 
    KinectPV2 kinect;
    Spout spout;
    
    void setup() {
      size(640, 360, P3D);
      textureMode(NORMAL);
      kinect = new KinectPV2(this);
      kinect.enableDepthImg(true);
      kinect.enableBodyTrackImg(true);
      kinect.enableColorImg(true);
      kinect.init();
    
      canvas = createGraphics(1920, 1080, P3D);
      img = loadImage("SpoutLogoMarble3.bmp");
        spout = new Spout(this);
      spout.createSender("rgb image");
    
    
    } 
    
    void draw()  { 
    
    background(0, 90, 100);
    noStroke();
    canvas.beginDraw();
      canvas.image(kinect.getColorImage(), 0, 0, 1920, 1080);
          canvas.endDraw(); 
    
              spout.sendTexture(canvas);
    
    }
    
  • above is the code I'm using. For some reason, it worked before. Other sketches work fine.

  • Try recreating the files you have in your data folder, they may cause the bug.

  • I will comment out all those functions to spout and make sure that the kinect code is working. Then i will address the spout code.

    Kf

Sign In or Register to comment.