简体   繁体   English

Android中的相机叠加

[英]Camera overlay in Android

So without a screenshot you guys won't know what I'm talking about.. So here we go: 因此,没有截图,你们不会知道我在说什么。所以在这里我们去:

在此处输入图片说明

This particular part of my application I need to do an overlay over the camera interface as seen in the screenshot. 我的应用程序的这一特定部分需要在摄像头界面上进行覆盖,如屏幕截图所示。 2 rectangles - And when you take the picture, I want to end up with 2 images, the cuttings taken from the 2 rectangles. 2个矩形-拍摄照片时,我想得到2张图像,即从2个矩形中截取的剪裁。

If this doesn't make sense, please comment and ask for clarification. 如果这没有意义,请发表评论并要求澄清。 I honestly don't even know where to begin with this one. 老实说,我什至不知道从哪里开始。 What would be a good starting point? 什么是一个很好的起点? Is this even possible? 这有可能吗?

I guess you will have to create your own Custom Camera: 我想您将必须创建自己的自定义相机:

http://developer.android.com/guide/topics/media/camera.html#custom-camera http://developer.android.com/guide/topics/media/camera.html#custom-camera

where you can implement your own preview layout - thus you can put those frames over camera preview as you wish 您可以在其中实现自己的预览布局-因此您可以根据需要将这些帧放在相机预览上

but it won't be easy as many of devices exists with many different camera resolutions, some work only in landscape, even though their native interface is portrait, it's a fake landscape; 但是,这并不容易,因为许多设备都具有许多不同的相机分辨率,有些设备只能在横向模式下工作,即使它们的本机界面是纵向模式,也只能是伪造的横向模式。 and also aligning those frames with the picture you'll be actually getting will be a challenge; 并且将这些帧与您将实际获得的图片对齐将是一个挑战; but definitely this is Custom Camera - good luck 但这绝对是自定义相机-祝您好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM