有没有办法设置我想要的LED强度?我知道打开我使用的LED:
p.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
mycam.setParameters(p);
Run Code Online (Sandbox Code Playgroud)
但是这段代码只是打开了LED.但有没有办法为LED设置不同的强度以获得更强的光线或降低光线强度?
有几个教程可以解释如何在Android设备上进行简单的摄像头预览和运行.但我找不到任何解释如何在渲染之前操纵图像的例子.
我想要做的是实现自定义颜色过滤器来模拟例如红色和/或绿色缺陷.
很明显,有些人已经能够弄清楚如何通过SDK(例如Spore Origins)访问iPhone相机.如何才能做到这一点?
是否有任何好的教程或示例应用程序,演示如何制作增强现实iPhone应用程序?
如果您想使用使用原生Android相机的内置相机活动,只需执行以下操作即可.
Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
this.startActivityForResult(camera, PICTURE_RESULT);
Run Code Online (Sandbox Code Playgroud)
你想从你展示的漂亮相机中取回图像 - 但是如何?
我在捕获图像并将其存储在本机相机应用程序时遇到问题.以下是我的一些代码示例.
_path = Environment.getExternalStorageDirectory() + "make_machine_example.jpg";
File file = new File( _path );
Uri outputFileUri = Uri.fromFile( file );
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE );
intent.putExtra( MediaStore.EXTRA_OUTPUT, outputFileUri );
startActivityForResult( intent, 0 );
Run Code Online (Sandbox Code Playgroud)
拍完照片后我又回到原来的活动中,当我通过Android DDMS文件浏览器导航到我的SD卡时,图片不存在.任何人都知道为什么没有得救?
camera android android-intent android-camera android-camera-intent
我一直在试图让我的头发试图让AVFoundation相机以正确的方向(即设备方向)拍摄图片,但我无法让它工作.
我看过教程,我看过WWDC演示文稿,我已经下载了WWDC示例程序,但即便如此也没有.
我的应用程序的代码是......
AVCaptureConnection *videoConnection = [CameraVC connectionWithMediaType:AVMediaTypeVideo fromConnections:[imageCaptureOutput connections]];
if ([videoConnection isVideoOrientationSupported])
{
[videoConnection setVideoOrientation:[UIApplication sharedApplication].statusBarOrientation];
}
[imageCaptureOutput captureStillImageAsynchronouslyFromConnection:videoConnection
completionHandler:^(CMSampleBufferRef imageDataSampleBuffer, NSError *error)
{
if (imageDataSampleBuffer != NULL)
{
//NSLog(@"%d", screenOrientation);
//CMSetAttachment(imageDataSampleBuffer, kCGImagePropertyOrientation, [NSString stringWithFormat:@"%d", screenOrientation], 0);
NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageDataSampleBuffer];
UIImage *image = [[UIImage alloc] initWithData:imageData];
[self processImage:image];
}
}];
Run Code Online (Sandbox Code Playgroud)
(processImage使用与WWDC代码相同的writeImage ...方法)
并且WWDC应用程序的代码是......
AVCaptureConnection *videoConnection = [AVCamDemoCaptureManager connectionWithMediaType:AVMediaTypeVideo fromConnections:[[self stillImageOutput] connections]];
if ([videoConnection isVideoOrientationSupported]) {
[videoConnection setVideoOrientation:AVCaptureVideoOrientationPortrait];
}
[[self stillImageOutput] captureStillImageAsynchronouslyFromConnection:videoConnection
completionHandler:^(CMSampleBufferRef imageDataSampleBuffer, NSError *error) {
if …Run Code Online (Sandbox Code Playgroud) 我正在使用Camera API并调用相机.
我想在相机预览的顶部显示标题(用于标记).标题是jpeg图像.
可能吗?任何帮助赞赏.
提前致谢.
我的代码如下.
public class CameraActivity extends Activity {
@Override
protected void onPause() {
super.onPause();
}
private static final int CAMERA_PIC_REQUEST = 2500;
private Bitmap image2;
private Bitmap bm;
public static String imagepath;
public static int x=1;
private RdmsDbAdapter dbHelper;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.header);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
//caling new incident
if(IncidentFormActivity.incident_id == null || IncidentFormActivity.isDisable==true){
//DBAdapter instance created and connection opened.
dbHelper = new RdmsDbAdapter(CameraActivity.this);
dbHelper.open();
//setting up flags
NewIncidentHelper nih = new NewIncidentHelper();
nih.setUpNewIncident(); …Run Code Online (Sandbox Code Playgroud) 我需要获取iOS设备相机拍摄的图像的GPS坐标.我不关心相机胶卷图像,只关心用UIImagePickerControllerSourceTypeCamera拍摄的图像.
我已经阅读了很多stackoverflow的答案,比如来自UIImage的Get Exif数据 - UIImagePickerController,它假设你正在使用AssetsLibrary框架,它似乎不适用于相机图像,或者使用CoreLocaiton从应用程序获取纬度/经度本身,而不是图像.
使用CoreLocation 不是一种选择.按下快门按钮时,这不会给我坐标.(借助基于CoreLocation解决方案,您可能需要你带了相机视图之前或之后记录COORDS,当然,如果设备在移动坐标将是错误的.这个方法应该用固定设备工作).
我只是iOS5,所以我不需要支持旧设备.这也适用于商业产品,因此我无法使用http://code.google.com/p/iphone-exif/.
那么,从iOS5中相机返回的图像中读取GPS数据有哪些选择?我现在能够想到的是将图像保存到相机胶卷,然后使用AssetsLibrary,但这看起来很糟糕.
谢谢!
这是我根据Caleb的答案编写的代码.
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
NSData *jpeg = UIImageJPEGRepresentation(image,1.0);
CGImageSourceRef source ;
source = CGImageSourceCreateWithData((__bridge CFDataRef)jpeg, NULL);
NSDictionary *metadataNew = (__bridge NSDictionary *) CGImageSourceCopyPropertiesAtIndex(source,0,NULL);
NSLog(@"%@",metadataNew);
Run Code Online (Sandbox Code Playgroud)
我的控制台显示:
2012-04-26 14:15:37:137 ferret[2060:1799] {
ColorModel = RGB;
Depth = 8;
Orientation = 6;
PixelHeight = 1936;
PixelWidth = 2592;
"{Exif}" = {
ColorSpace = 1;
PixelXDimension = 2592;
PixelYDimension = 1936;
};
"{JFIF}" = {
DensityUnit = 0; …Run Code Online (Sandbox Code Playgroud) 在XNA游戏中创建视差效果的最佳方法是什么?我希望相机能够跟踪我的精灵,因为它在世界各地移动,这样我就可以构建缩放,平移,摇动和其他效果等效果.任何人都有一个很好的例子说明如何做到这一点,最好是在GameComponent中?
camera ×10
android ×5
iphone ×3
ios ×2
avfoundation ×1
c# ×1
camera-flash ×1
colorfilter ×1
flashlight ×1
geolocation ×1
gps ×1
header ×1
java ×1
led ×1
orientation ×1
sprite ×1
xna ×1