I am trying to make a scrolling level to a test game I am doing as a learning exercise. I have created a map containing lots of tiles which are drawn according to their position in an array. I basically want the camera to scroll down the level, but at the moment it just frantically shakes up and down a little bit.
I have a camera class which is just a blank static class containing a static vector2 for the …
我想制作夜视摄像头Android应用程序,有人说Android中没有这样的内置功能,有些只是调整摄像头效果,
我需要一个明确的澄清,是否有可能为Android制作夜视摄像头应用程序,或者所有现有的夜视应用程序只是做相机技巧?
请帮助我
我想在我的iOS应用程序中创建一个按钮,当用户点击它时,他/她有两个选择:从相册中选择一张照片或从相机拍摄照片到firebase数据库.
为了实现这一目标,我必须遵循什么结构?将图像上传到firebase数据库!
我是Swift的初学者,无法弄清楚它为什么崩溃。
模拟器很好(它只是告诉我该设备没有相机),但是当我在实际的手机上打开它时,应用程序崩溃了。(在11.2.6中使用iphone x)
除相机功能外,其他所有功能都很好。
我如何解决它?提前致谢!
import Foundation
import UIKit
class ProductInfoController: UIViewController,
UIImagePickerControllerDelegate, UINavigationControllerDelegate,
UITextFieldDelegate {
@IBOutlet weak var productName: UITextField!
@IBOutlet weak var productImage: UIImageView!
var product = Product()
var returningFromPicker = false
override func viewDidLoad() {
super.viewDidLoad()
navigationController?.navigationBar.prefersLargeTitles = true
navigationItem.largeTitleDisplayMode = .always
navigationController?.navigationBar.largeTitleTextAttributes = [NSAttributedStringKey.foregroundColor : UIColor.white]
productName.delegate = self
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if !returningFromPicker {
if productName.text == nil {
productName.text = product.productName
}
if productImage.image == nil {
productImage.image = …Run Code Online (Sandbox Code Playgroud) 我正在尝试确定闪光灯是打开还是关闭,这样只需一个按钮我就可以打开和关闭闪光灯.这是我的代码:
Camera cam = getCameraInstance(); //A method that opens the cam
Camera.Parameters parameters = cam.getParameters();
System.out.println("Current flash mode " + parameters.getFlashMode());
System.out.println("flash mode off equals to : " + Camera.Parameters.FLASH_MODE_OFF);
System.out.println(parameters.getFlashMode() == Camera.Parameters.FLASH_MODE_OFF);
Run Code Online (Sandbox Code Playgroud)
前两个系统的输出是off.当然我假设因为它们都返回一个off字符串,将==操作符放在它们之间会返回true(因此允许我检查闪存是否打开)但它返回false.知道为什么吗?
我的目标是api 16并在Marshmallow设备上进行测试
阅读本文档https://developer.android.com/training/camera/photobasics后,我想拍摄一张照片并将照片的 uri 存储到给定的变量中。问题是我使用takePictureIntent.putExtra(Constants.INTENT_EXTRA_VARNAME, variable)and将变量名称和 uri 存储到意图中takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI),但在 onActivityResult 中意图数据为空,并且存储的变量和 uri 都不为空。我需要知道 uri 和变量。我究竟做错了什么?
我需要将信息作为意图数据传递,因为触发显示相机的操作的类与活动类不同。
带有动作的类:
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
takePictureIntent.putExtra(Constants.INTENT_EXTRA_VARNAME, variable);
// Ensure that there's a camera activity to handle the intent
if (takePictureIntent.resolveActivity(SectionManager.getInstance().getCurrentActivity().getPackageManager()) != null) {
// Create the File where the photo should go
File photoFile = null;
try {
photoFile = createImageFile();
} catch (IOException ex) {
ex.printStackTrace();
}
// Continue only if the File was successfully created
if (photoFile …Run Code Online (Sandbox Code Playgroud) camera android android-intent android-camera onactivityresult
我希望在自己的活动中显示前置或后置摄像头输入。另外,我希望用户控制两个摄像机的变焦。
我应该如何使用Camera对象调用,是不是已弃用?另外,如何使我的视图显示来自摄像机的实时数据?
你好我写了一个应用程序,并在部署显示错误行mCamera = Camera.open(); 其中mCamera是Camera的参考.
怎么能解决任何帮助呢?
谢谢
我想知道是否有可能在iOS平台上构建这种蓝牙应用程序.
有两种设备:
1.安装了摄像头模块的蓝牙设备
- 该设备只有一个摄像头模块,一个内存和一个蓝牙模块.
2. iOS设备.(睡觉 - 屏幕黑,可能锁定)
蓝牙设备可用于执行以下操作:
1.按下按钮拍照
2.通过蓝牙将图像发送到Iphone,
3.Iphone唤醒,将图片发送到服务器.
我很好奇的关键点是
1.是否可以用蓝牙信号唤醒设备,
2.是否可以启动应用程序/唤醒具有蓝牙信号的应用程序,以便它可以处理信息/发送?
此外,如果可以使用此功能,那么可以使用经典蓝牙模块完成,而无需注册MFI程序吗?还是我必须使用BLE?
我正在制作一个处理用户选择的照片的应用程序,我想添加一个“允许使用相机”选项,就像Skype、Facetime一样,需要用户许可才能使用相机和麦克风。我该如何做到这一点,以及我应该在“pubspec.yaml”中添加什么?
如何在 ubuntu 操作系统中使用 java 中的 swing 使用摄像头 请给我一些通过 java 使用摄像头的示例和指南。
public static void main(String[] args) {
CamDemo t = new CamDemo();
t.getCam();
}
public void getCam() {
try {
/* Grab the default web cam */
MediaLocator ml = new MediaLocator("vfw://0");
DataSource ds = Manager.createDataSource(ml);
requestFormatResolution(ds);
Player p = Manager.createRealizedPlayer(ds);
p.start();
Thread.currentThread().sleep(1000);
JFrame jfrm = new JFrame("Testing Webcam");
jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
if (p.getVisualComponent() != null)
jfrm.getContentPane().add(p.getVisualComponent());
if (p.getControlPanelComponent() != null)
jfrm.getContentPane().add(p.getControlPanelComponent(),
BorderLayout.SOUTH);
jfrm.pack();
jfrm.setLocationRelativeTo(null);
jfrm.setVisible(true);
jfrm.setSize(320, 240);
} catch (Exception e) { …Run Code Online (Sandbox Code Playgroud)