非常需要 M (手动)QX1上的曝光模式。我正在寻找我的问题的答案,但没有找到确切的答案。我可以通过API在QX1上选择完整的手动曝光模式吗?
答案 0 :(得分:2)
不,您无法使用QX1相机上的当前固件设置手动模式。
您应该使用 getAvailableExposureMode 或 getSupportedExposureMode API方法来检索支持的模式(并可选择将其显示给用户),然后使用其中一种模式在 setExposureMode 。
但是QX1相机不支持手动模式,因此getSupported / Available方法不会返回它,这就是API将错误返回到 setExposureMode 调用的原因
该API旨在支持多种具有多种不同功能的SONY相机。对于每个属性,您都有以下API方法:
这样,如果应用程序编码良好,它将支持所有摄像头。
因此,它不是API问题,而是固件问题。 QX1的当前固件不支持手动模式。
尚未正式更新固件:(
https://esupport.sony.com/US/p/model-home.pl?mdl=ILCEQX1&LOC=3#/downloadTab
答案 1 :(得分:1)
您是否尝试过此处:https://github.com/erik-smit/sony-camera-api/blob/master/actEnableMethods.sh
此处对此hack的其他引用:http://chdk.setepontos.com/index.php?topic=10736.10 我无法让它工作,但如果它可以以任何方式帮助你的研究
public String getDG() throws IOException {
String service = "accessControl";
try {
JSONObject paramsMethods =
new JSONObject().put("developerName","");
paramsMethods.put("sg","");
paramsMethods.put("methods","");
paramsMethods.put("developerID","");
JSONObject requestJson =
new JSONObject().put("method", "actEnableMethods") //
.put("params", new JSONArray().put(paramsMethods)) //
.put("id", id()).put("version", "1.0");
String url = findActionListUrl(service) + "/" + service;
log("Request: " + requestJson.toString());
String responseJson = SimpleHttpClient.httpPost(url, requestJson.toString());
log("Response: " + responseJson);
JSONArray resultsObj = new JSONObject(responseJson).getJSONArray("result");
String dg = null;
JSONObject dgobj = resultsObj.getJSONObject(0);
dg = dgobj.getString("dg");
return dg;
} catch (JSONException e) {
throw new IOException(e);
}
}
public String getSG(String dg){
MessageDigest md;
String keydg = "90adc8515a40558968fe8318b5b023fdd48d3828a2dda8905f3b93a3cd8e58dc" + dg;
try {
md = MessageDigest.getInstance("SHA-256");
md.update(keydg.getBytes());
String SG = new String(Base64.encode(md.digest(), 0));
return SG;
}catch(Exception e){
}
return null;
}
public JSONObject actEnableMethods() throws IOException {
String DG = getDG();
String SG = getSG(DG);
String service = "accessControl";
try {
JSONObject paramsMethods =
new JSONObject().put("developerName","Sony Corporation");
paramsMethods.put("sg",SG);
paramsMethods.put("methods","camera/setFlashMode:camera/getFlashMode:camera/getSupportedFlashMode:camera/getAvailableFlashMode:camera/setExposureCompensation:camera/getExposureCompensation:camera/getSupportedExposureCompensation:camera/getAvailableExposureCompensation:camera/setSteadyMode:camera/getSteadyMode:camera/getSupportedSteadyMode:camera/getAvailableSteadyMode:camera/setViewAngle:camera/getViewAngle:camera/getSupportedViewAngle:camera/getAvailableViewAngle:camera/setMovieQuality:camera/getMovieQuality:camera/getSupportedMovieQuality:camera/getAvailableMovieQuality:camera/setFocusMode:camera/getFocusMode:camera/getSupportedFocusMode:camera/getAvailableFocusMode:camera/setStillSize:camera/getStillSize:camera/getSupportedStillSize:camera/getAvailableStillSize:camera/setBeepMode:camera/getBeepMode:camera/getSupportedBeepMode:camera/getAvailableBeepMode:camera/setCameraFunction:camera/getCameraFunction:camera/getSupportedCameraFunction:camera/getAvailableCameraFunction:camera/setLiveviewSize:camera/getLiveviewSize:camera/getSupportedLiveviewSize:camera/getAvailableLiveviewSize:camera/setTouchAFPosition:camera/getTouchAFPosition:camera/cancelTouchAFPosition:camera/setFNumber:camera/getFNumber:camera/getSupportedFNumber:camera/getAvailableFNumber:camera/setShutterSpeed:camera/getShutterSpeed:camera/getSupportedShutterSpeed:camera/getAvailableShutterSpeed:camera/setIsoSpeedRate:camera/getIsoSpeedRate:camera/getSupportedIsoSpeedRate:camera/getAvailableIsoSpeedRate:camera/setExposureMode:camera/getExposureMode:camera/getSupportedExposureMode:camera/getAvailableExposureMode:camera/setWhiteBalance:camera/getWhiteBalance:camera/getSupportedWhiteBalance:camera/getAvailableWhiteBalance:camera/setProgramShift:camera/getSupportedProgramShift:camera/getStorageInformation:camera/startLiveviewWithSize:camera/startIntervalStillRec:camera/stopIntervalStillRec:camera/actFormatStorage:system/setCurrentTime");
paramsMethods.put("developerID","7DED695E-75AC-4ea9-8A85-E5F8CA0AF2F3");
JSONObject requestJson =
new JSONObject().put("method", "actEnableMethods") //
.put("params", new JSONArray().put(paramsMethods)) //
.put("id", id()).put("version", "1.0");
String url = findActionListUrl(service) + "/" + service;
log("Request: " + requestJson.toString());
String responseJson = SimpleHttpClient.httpPost(url, requestJson.toString());
log("Response: " + responseJson);
return new JSONObject(responseJson);
} catch (JSONException e) {
throw new IOException(e);
}
}
答案 2 :(得分:0)
看来你可以。根据表格here,您可以在QX1上设置曝光模式。您可以将setExposureMode
API方法与以下JSON一起使用:
{
"method": "setExposureMode",
"params": ["Manual"],
"id": 1,
"version": "1.0"
}
来源:
下载的API参考