I'm trying to build an apps to capture picture from usb camera, using UVCCamera from https://github.com/saki4510t/UVCCamera But, i didn't know, how to implement image adjustment setting (like Adjust Brightness, Contrast, White Balance) in this library. I've tried to using seekbar to adjust brightness setting, and this is my code :
final UVCCamera camera = new UVCCamera();
private final OnSeekBarChangeListener mSeekBarChangeListener = new OnSeekBarChangeListener()
{
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser)
{
if (mCameraHandler.isOpened()) //When USB Camera, Connected
{
camera.setBrightness(progress);
}
}
@Override
public void onStartTrackingTouch(SeekBar seekBar)
{
}
@Override
public void onStopTrackingTouch(SeekBar seekBar)
{
}
};
And, if i try to change value of seekbar, the value has changed, but it doesn't change the brightness level. Can anybody explain me, how to change the image adjustment in this library or give me correction about my code? Any answers will be apreciate from me
Regards, and have a good day everyone :)
I updated the files in my project from the new version of the library (libuvccamera, usbCameraCommon) and modified the code from the example 8. I gave a sample code. Here is an example of the code that I got.
And edit AbstractUVCCameraHandler.java