liudr, i added new version with Gain/Exposure controls.
http://ps3eye.googlecode.com/files/PS3Eye.v.0.0.2.zip
all stuff below work for me
Code:public boolean IsAutoAGC()
public void AutoAGC(boolean enable)
// Gain value [0..79]
public int GetGain()
public void SetGain(int value)
public boolean IsAutoAEC()
public void AutoAEC(boolean enable)
// Exposure value [0..511]
public int GetExposure()
public void SetExposure(int value)
public boolean IsAutoAWB()
public void AutoAWB(boolean enable)
public void SetWhiteBalance(byte r, byte g, byte b)
public boolean IsColorBar()
public void ColorBar(boolean enable)
i dont implement 'GetWhiteBalance' method for this moment, have some problems with C++ pointers ))) will look into this more tomorrow. also will check blobs stuff from jMyron.
below some dirty code i used for testing
Code:import ru.cleoag.*;
PS3Eye p;
PImage img;
int cameraWidth = 640;
int cameraHeight = 480;
int cameraRate = 60;
void setup(){
size(640,480);
p = new PS3Eye(this);
p.start(cameraWidth,cameraHeight,cameraRate);
img = createImage(cameraWidth,cameraHeight,RGB);
}
void draw(){
background(0);
p.update();
p.imageCopy(img.pixels);
img.updatePixels();
image(img,0,0,width,height);
}
void mouseDragged(){
int gain = (int)map(mouseX,0f,640f,0f,79f);
int exposure = (int)map(mouseY,0f,480f,0f,511f);
byte r = (byte)map(mouseX,0f,640f,0f,255f);
byte g = (byte)map(mouseY,0f,480f,0f,255f);
byte b = 127;
p.SetWhiteBalance(r,g,b);
//p.SetGain(gain);
//p.SetExposure(exposure);
}
void keyPressed(){
// p.ColorBar(!p.IsColorBar());
p.AutoAGC(!p.IsAutoAGC());
p.AutoAEC(!p.IsAutoAEC());
p.AutoAWB(!p.IsAutoAWB());
println(p.IsAutoAGC());
}
void stop(){
p.stop();
}