I posted in another thread already and figured out what the actual problem is. I have a sketch where the video and blobdetection librarys are used. It works perfectly on any 32bit computer, but no on my Win7 64bit. Of course did I try to take the 32bit processing version (2.08b), but this didn't change anything. Also the compatibility mode did not change anything. Is there any way to make this work on a 64bit system?
// ================================================== // setup() // ================================================== void setup() { // Size of applet size(640, 480); // Capture cam = new Capture(this, 40*4, 30*4, 15); // Comment the following line if you use Processing 1.5 cam.start();
// BlobDetection // img which will be sent to detection (a smaller copy of the cam frame); img = new PImage(80,60); theBlobDetection = new BlobDetection(img.width, img.height); theBlobDetection.setPosDiscrimination(true); theBlobDetection.setThreshold(0.2f); // will detect bright areas whose luminosity > 0.2f; }
// ================================================== // Super Fast Blur v1.1 // by Mario Klingemann // <http://incubator.quasimondo.com> // ================================================== void fastblur(PImage img,int radius) { if (radius<1){ return; } int w=img.width; int h=img.height; int wm=w-1; int hm=h-1; int wh=w*h; int div=radius+radius+1; int r[]=new int[wh]; int g[]=new int[wh]; int b[]=new int[wh]; int rsum,gsum,bsum,x,y,i,p,p1,p2,yp,yi,yw; int vmin[] = new int[max(w,h)]; int vmax[] = new int[max(w,h)]; int[] pix=img.pixels; int dv[]=new int[256*div]; for (i=0;i<256*div;i++){ dv[i]=(i/div); }
yw=yi=0;
for (y=0;y<h;y++){ rsum=gsum=bsum=0; for(i=-radius;i<=radius;i++){ p=pix[yi+min(wm,max(i,0))]; rsum+=(p & 0xff0000)>>16; gsum+=(p & 0x00ff00)>>8; bsum+= p & 0x0000ff; } for (x=0;x<w;x++){
I have a HP EliteBook 8460p laptop (Win7 64bit) and want to use it's internal webcam. However, when I try to run the code, I get:
Exception in thread "Animation Thread" java.lang.RuntimeException: The requested resolution of 160x120, 15/1fps is not supported by the selected capture device.
at processing.video.Capture.checkResIsValid(Capture.java:754) at processing.video.Capture.start(Capture.java:321) at bd_webcam.setup(bd_webcam.java:41) at processing.core.PApplet.handleDraw(PApplet.java:2241) at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:243) at processing.core.PApplet.run(PApplet.java:2140) at java.lang.Thread.run(Thread.java:662)
The camera has to be capable of this resolution, also lower numbers don't work. Do you have any ideas? thanks!