在"如何使用Camera Remote API开发应用程序"中,它表示"Camera Remote API使用基于HTTP的JSON-RPC.因此,您可以将Camera Remote API与任何操作系统一起使用,例如Android,IOS或Microsoft®的Windows®".这是有道理的,因为协议是平台无关的.但是,在此页面上的相机兼容性图表中:http://developer.sony.com/develop/cameras/它指出必须安装Sony智能远程控制应用程序才能"启用API".由于该应用仅限iOS和Android,这是否意味着API无法在Windows上使用?
我非常有兴趣为Windows 8平板电脑开发远程控制应用程序,然后为Windows 8手机开发.但如果我无法控制A5000,A7R,A7,NEX-6,NEX-5R或NEX-5T,那么它就变得不那么有趣了.
是否可以使用普通的HTTP JSON通信来控制这些摄像机?
谢谢
我正在努力如何使用相机移动以适应我的两个标记,并将它们保持在同一水平.因此,这意味着修改缩放以适应它们并转动相机以适合同一行上的标记.
接下来的两张照片将澄清我的问题:


那么,到目前为止我所做的是:
public void centerIncidentRouteOnMap(List<LatLng> copiedPoints) {
double minLat = Integer.MAX_VALUE;
double maxLat = Integer.MIN_VALUE;
double minLon = Integer.MAX_VALUE;
double maxLon = Integer.MIN_VALUE;
for (LatLng point : copiedPoints) {
maxLat = Math.max(point.latitude, maxLat);
minLat = Math.min(point.latitude, minLat);
maxLon = Math.max(point.longitude, maxLon);
minLon = Math.min(point.longitude, minLon);
}
final LatLngBounds bounds = new LatLngBounds.Builder().include(new LatLng(maxLat, maxLon)).include(new LatLng(minLat, minLon)).build();
mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 120));
}
Run Code Online (Sandbox Code Playgroud)
但这只会使两个标记适合屏幕,所以我需要知道如何以正确的角度旋转相机以获得最后一张照片.
谁可以帮我这个事?
谢谢!
嗨,我希望连接USB相机到Android手机我可以访问Galaxy note 1和Sony Xperia L,我可以通过Note打开USB记忆棒,但不能用Sony,所以我想这个音符将是我的项目的最佳选择,我的手机没有扎根..没有root手机可能吗?任何指针从哪里开始,如果有人知道一些示例项目..谢谢
我是这个论坛的新手,只是为了问这个具体的问题而注册:我一直在关注视频游戏开发的YouTube网络系列(如何制作2D游戏 - 由EddieVanHalen98制作)但他没有告诉我如何让相机跟随特定的精灵.
我的渲染代码如下
public class [ClassName] {
polkymain game;
OrthographicCamera camera;
public static int PolkyX;
public static int PolkyY;
SpriteBatch batch;
public GameScreen(polkymain game){
this.game = game;
camera = new OrthographicCamera();
camera.setToOrtho(true, 1280, 1240);
batch = new SpriteBatch();
PolkyX = 0;
PolkyY = 0;
}
@Override
public void render(float delta) {
Gdx.gl.glClearColor(0.95F, 0.95F, 0.95F, 0.95F);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
camera.update();
generalUpdate();
batch.setProjectionMatrix(camera.combined);
batch.begin();
batch.draw(Assets.Sprite_Mario_main, PolkyX, PolkyY);
batch.end();
}
public void generalUpdate(){
if(Gdx.input.isKeyPressed(Keys.D) || (Gdx.input.isKeyPressed(Keys.LEFT))
{
PolkyX += 5;
}
if(Gdx.input.isKeyPressed(keys.A) || (Gdx.input.isKeyPressd(Keys.RIGHT)) …Run Code Online (Sandbox Code Playgroud) 所以我设法使用自定义指令通过Angular.js将图像上传到我的服务器.我还设法实现了Cordova的相机功能.现在我正在尝试连接这两个,但是当将图像发送到服务器时,它们被存储为null.我相信问题在于我使用输入字段来获取图像,并且它获得了完整的对象,现在我在拍摄照片并发送之后只获得图像路径.我的问题是,我真的不明白如何将路径转换为Object,如果这是问题?
的index.html
<form class="form-horizontal" role="form">
<button class="picButton" ng-click="getPhoto()" class="button button-block button-primary">Take Photo</button>
<img ng-src="{{lastPhoto}}" style="max-width: 100%">
...
</form>
Run Code Online (Sandbox Code Playgroud)
controllers.js
$scope.getPhoto = function() {
Camera.getPicture().then(function(imageURI) {
console.log(imageURI);
$scope.lastPhoto = imageURI;
$scope.upload(); <-- call to upload the pic
},
function(err) {
console.err(err);
}, {
quality: 75,
targetWidth: 320,
targetHeight: 320,
saveToPhotoAlbum: false
});
};
$scope.upload = function() {
var url = '';
var fd = new FormData();
//previously I had this
//angular.forEach($scope.files, function(file){
//fd.append('image',file)
//});
fd.append('image', $scope.lastPhoto);
$http.post(url, fd, {
transformRequest:angular.identity,
headers:{'Content-Type':undefined …Run Code Online (Sandbox Code Playgroud) 我在使用AVCapture时遇到了麻烦.
背景故事:我为我的iPad应用程序制作了一个新的故事板我复制了iPhone故事板并通过在需要的地方添加.iPad来更改新故事板的源代码.目前,我的应用只使用纵向模式.
然而AVCapture,(我现在用的显示相机的活饲料)仅填充屏幕的一部分,在外面黑条.我也注意到它在3.5英寸屏幕iPhone上做到了这一点.
我会按要求添加代码.
请使所有说明超级易于遵循,这是我的第一个应用程序,我是一个新手.
谢谢!!科
编辑:我从Apple的文档中尝试了这段代码,但它没有用:
AVCaptureSession *captureSession;
AVCaptureVideoPreviewLayer *previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:captureSession];
UIView *aView;
previewLayer.frame = aView.bounds;
[aView.layer addSublayer:previewLayer];
我知道有更多重复的问题,但请,这对我来说非常重要.我现在很难用Windows Phone 8.1 C#相机初始化.
async private void InitCamera_Click(object sender, RoutedEventArgs e)
{
captureManager = new MediaCapture();
await captureManager.InitializeAsync();
try
{
captureManager = new Windows.Media.Capture.MediaCapture();
await captureManager.InitializeAsync();
if (captureManager.MediaCaptureSettings.VideoDeviceId != "" && captureManager.MediaCaptureSettings.AudioDeviceId != "")
{
System.Diagnostics.Debug.WriteLine("Init successful");
captureManager.RecordLimitationExceeded += new Windows.Media.Capture.RecordLimitationExceededEventHandler(RecordLimitationExceeded);
captureManager.Failed += new Windows.Media.Capture.MediaCaptureFailedEventHandler(Failed);
}
else
{
System.Diagnostics.Debug.WriteLine("No Device");
}
}
catch (Exception exception)
{
System.Diagnostics.Debug.WriteLine("Exception raised!!!!:" + exception);
}
}
Run Code Online (Sandbox Code Playgroud)
这是我初始化相机的代码,但由于某种原因,它在Lumia 920 上的Windows.Media.Capture.MediaCapture()构造函数调用失败,System.UnauthorizedAccessException并且在模拟器上也是访问冲突.我已经用Google搜索了这个问题,但到目前为止还没有答案.有些人告诉我不仅应该启用网络摄像头,还要启用麦克风,但这并没有解决我的问题.一切似乎设置得很好,所有访问权限都在app清单中授予.另外我想问你,如果你有一些很好的工作实例/教程用相机拍照,请提供.
您是否可以使用MediaCapture元素提供有关如何拍摄和保存照片的实际工作示例.我曾尝试在MSDN中寻找实际的解决方案,但这些解释或代码都没有以简单的方式描述过程.
我需要拍照并将其保存到我的库(我需要为此显示正确的预览),但是现在它旋转了90度而我无法调整它.我已经尝试设置视频预览的旋转,它适用于预览,但是当我这样做时,宽高比全部错误,保存的图像不正确.
第9频道的例子也很糟糕.我只需要一个简单的实现......
我使用运行时应用程序而不是Windows Phone 8.1的Silverlight应用程序.
Please help me out with this Android camera.
The error I get is below:
Unable to resume activity {..,CreatePropertyActivity5}: Failure delivering result ResultInfo{who=null, request=100, result=-1, data=null} to activity..: java.lang.NullPointer
Run Code Online (Sandbox Code Playgroud)
It also gives this warning which is strange since I compress the images:
W/OpenGLRenderer(10242): Bitmap too large to be uploaded into a texture (3264x2448, max=2048x2048)
Run Code Online (Sandbox Code Playgroud)
My app allows the user to select a photo from gallery or take one using camera. As u can figure out from the code there is …
我正在使用示例camera2谷歌并运作良好.
但是如何用按钮在后面和前面之间切换相机?
private void setUpCameraOutputs(int width, int height) {
Activity activity = getActivity();
CameraManager manager = (CameraManager) activity.getSystemService(Context.CAMERA_SERVICE);
try {
for (String cameraId : manager.getCameraIdList()) {
CameraCharacteristics characteristics
= manager.getCameraCharacteristics(cameraId);
// We don't use a front facing camera in this sample. Para trocar, colocar != no lugar de ==.
if (characteristics.get(CameraCharacteristics.LENS_FACING)
== CameraCharacteristics.LENS_FACING_FRONT) {
continue;
}
StreamConfigurationMap map = characteristics.get(
CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
// For still image captures, we use the largest available size.
Size largest = Collections.max(
Arrays.asList(map.getOutputSizes(ImageFormat.JPEG)),
new CompareSizesByArea());
mImageReader …Run Code Online (Sandbox Code Playgroud)