void ofxRPiCameraVideoGrabber::applyAllSettings() { setExposurePreset(exposurePreset); setMeteringType(meteringType); setAutoISO(autoISO); setISO(ISO); setAutoShutter(autoShutter); setShutterSpeed(shutterSpeed); setSharpness(sharpness); setContrast(contrast); setBrightness(brightness); setSaturation(saturation); setFrameStabilization(frameStabilization); setWhiteBalance(whiteBalance); setImageFilter(imageFilter); setColorEnhancement(false); //TODO implement setDRE(dreLevel); setSensorCrop(cropRectangle); setDigitalZoom(); setRotation(rotation); setMirror(mirror); setSoftwareSharpening(doDisableSoftwareSharpen); setSoftwareSaturation(doDisableSoftwareSaturation); applyExposure(__func__); //Requires gpio program provided via wiringPi //sudo apt-get install wiringpi ofFile gpioProgram("/usr/bin/gpio"); hasGPIOProgram = gpioProgram.exists(); if(hasGPIOProgram) { LED_PIN = getLEDPin(); stringstream command; command << "gpio export "; command << LED_PIN; command << " out"; if(system(command.str().c_str()) == 0) { //silence compiler warning } LED = true; setLEDState(LED); } }
void ofxRPiCameraVideoGrabber::setup(CameraState cameraState) { setup(cameraState.cameraSettings); map<string, string> keyValueMap = cameraState.keyValueMap; for(auto iterator = keyValueMap.begin(); iterator != keyValueMap.end(); iterator++) { string key = iterator->first; string value = iterator->second; //ofLogVerbose(__func__) << "key: " << key << " value: " << value; if(key == "sharpness") setSharpness(ofToInt(value)); if(key == "contrast") setContrast(ofToInt(value)); if(key == "brightness") setBrightness(ofToInt(value)); if(key == "saturation") setSaturation(ofToInt(value)); if(key == "ISO") setISO(ofToInt(value)); if(key == "AutoISO") setAutoISO(ofToBool(value)); if(key == "DRE") setDRE(ofToInt(value)); if(key == "cropRectangle") { vector<string> rectValues = ofSplitString(value, ","); if(rectValues.size() == 4) { setSensorCrop(ofToInt(rectValues[0]), ofToInt(rectValues[1]), ofToInt(rectValues[2]), ofToInt(rectValues[3])); } } if(key == "zoomLevelNormalized") setZoomLevelNormalized(ofToFloat(value)); if(key == "mirror") setMirror(value); if(key == "rotation") setRotation(ofToInt(value)); if(key == "imageFilter") setImageFilter(value); if(key == "exposurePreset") setExposurePreset(value); if(key == "evCompensation") setEvCompensation(ofToInt(value)); if(key == "autoShutter") setAutoShutter(ofToBool(value)); if(key == "shutterSpeed") setShutterSpeed(ofToInt(value)); if(key == "meteringType") setMeteringType(value); if(key == "SoftwareSaturationEnabled") setSoftwareSaturation(ofToBool(value)); if(key == "SoftwareSharpeningEnabled") setSoftwareSharpening(ofToBool(value)); } }
FeatherBlender(float sharpness = 0.02f) { setSharpness(sharpness); }
void QCamVesta::setBestQuality() { setNoiseRemoval(0); setSharpness(0); setCompression(0); }