对我来说,实施和学习是一件非常有趣和新鲜的事情.我的申请有一些要求.为此,我搜索了很多,但找不到合适的,有价值的东西或链接.所以我在这里发帖子.功能是:
1)在三星设备中有Safety Assistance菜单,您可以在其中找到Emergency Mode选项.
2)现在Emergency mode我想在那时创建一个或多个主要联系人Emergency Mode.因此,现在在保持主页和音量按钮时,emergency将激活并通知通知.
3)现在emergency将在同一时刻激活GPS将自动启用,并且将自动捕获当前位置的两张照片,最后位置和两张照片将发送到Emergency mode作为主要联系人添加的联系人MMS.
注意:如果将启用录音机选项,则录音文件也将发送MMS.
所以,如果有人知道或有人实施,那么我非常感谢他/她.帮助将不胜感激.
我希望能够创建给定网站的屏幕截图,但网站可能比屏幕上可以查看的要大.有没有办法可以做到这一点?
目标是在WinForms应用程序中使用C#中的.NET执行此操作.
我知道如何使用Robot,Windowtester或FEST捕获屏幕截图.我也知道如何使用机器人从屏幕上读取像素.
int x = 10;
int y = 10;
Color px = getPixelColor(int x, int y);
Run Code Online (Sandbox Code Playgroud)
但是,我不知道如何从已捕获的图像中读取像素.我打算将当前图像与文件中的图像进行比较.可以说两者都是PNG.是否有任何框架可用于逐像素地比较图像?
我正在使用代码从图库中选择一张图片
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.gallery);
Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(i, SELECT_PICTURE);
}
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == SELECT_PICTURE && resultCode == RESULT_OK && null != data) {
Uri selectedImage = data.getData();
String[] filePathColumn = { MediaStore.Images.Media.DATA };
Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
picturePath = cursor.getString(columnIndex);
cursor.close();
Log.v("picturePath", "picturePath: " + picturePath);
Bitmap bitmap = BitmapFactory.decodeFile(picturePath);
Intent intentUpload = new Intent(GalleryActivity.this, …Run Code Online (Sandbox Code Playgroud) 我正在使用Matlab从2点灰度相机(Flea2)中捕捉图像,我想更改相机的一些参数,如自动曝光,增益和快门速度.到目前为止,我使用了这些命令:
%Creating the two video input of the two cameras
cam1 = videoinput('dcam',1,'Y8_640x480');
cam2 = videoinput('dcam',2,'Y8_640x480');
%get devices properties
src1 = getselectedsource(cam1);
src2 = getselectedsource(cam2);
%define and set parameters to be changed
properties = {'AutoExposureAbsolute','AutoExposureControl', 'AutoExposureMode', 'GainAbsolute', 'GainControl', 'GainMode','ShutterAbsolute','ShutterControl', 'ShutterMode'};
values = {0,'absolute', 'manual', 0,'absolute', 'manual', 0, 'manual', 5e-06, 'absolute', 'manual'};
set(src1, properties, values)
set(src2, properties, values)
Run Code Online (Sandbox Code Playgroud)
因此,如果我显示src1和src2变量,上面的属性已经被修改,但是当我预览相机时没有任何改变.
虽然使用相同的语法来改变帧速率,但我很成功.
matlab camera image-capture image-processing computer-vision
我正在使用AVFoundation类在我的应用程序中实现自定义相机.我只捕捉静止图像,而不是视频.我有一切工作,但我被一些东西困扰.我会在捕获静止图像时考虑设备方向,并适当地设置视频连接的videoOrientation.代码段:
// set the videoOrientation based on the device orientation to
// ensure the pic is right side up for all orientations
AVCaptureVideoOrientation videoOrientation;
switch ([UIDevice currentDevice].orientation) {
case UIDeviceOrientationLandscapeLeft:
// Not clear why but the landscape orientations are reversed
// if I use AVCaptureVideoOrientationLandscapeLeft here the pic ends up upside down
videoOrientation = AVCaptureVideoOrientationLandscapeRight;
break;
case UIDeviceOrientationLandscapeRight:
// Not clear why but the landscape orientations are reversed
// if I use AVCaptureVideoOrientationLandscapeRight here the pic ends up upside down …Run Code Online (Sandbox Code Playgroud) 我想将捕获的图像设置为在同一gridlayout中动态创建的imageview,但它会创建一个新的网格布局并将捕获的图像设置为新的gridview.
这是我的mainactivity.java档案
public class MainActivity extends Activity implements AdapterView.OnItemClickListener {
GridView gridView;
ArrayList<Damage_Item> gridArray = new ArrayList<Damage_Item>();
CustomAdapter_back customGridAdapter;
GridLayout mContainerView;
int REQUEST_CAMERA = 0, SELECT_FILE = 1;
ImageView dynamic_imageview;
LinearLayout dynamic_linearview;
String image1;
ArrayList<String> arrayList_image = new ArrayList<String>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mContainerView = (GridLayout)findViewById(R.id.describedamage_gridview) ;
//gridArray.add(new Item(homeIcon,"Home"));
gridView = (GridView) findViewById(R.id.gridview1);
Button add = (Button)findViewById(R.id.button1);
add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
inflateImageRow();
}
});
}
public void selectImage() { …Run Code Online (Sandbox Code Playgroud) 我想每隔几秒钟处理一次 youtube 直播的输出。在其他人的帮助下,我想出了一个解决方案来捕获图像以供以后处理,但它往往会损坏并且速度太慢:
youtube-dl --prefer-ffmpeg -f worst "https://www.youtube.com/watch?v=Gy5PC5Auoak" -o - | dd count=32 bs=4096 | ffmpeg -i - -f image2 -frames:v 1 img22.jpeg
Run Code Online (Sandbox Code Playgroud)
(获取 128 KB 的流数据并将其中的一帧提取到 jpg 中)。最快的运行需要大约 30 秒。其他尝试涉及将 youtube-dl 导入 mplayer,但上面显示的方法似乎更有意义,因为它明确限制了接收的数据量。
我希望结果在树莓派上运行。
我正在试验 Google 的CameraX示例应用程序(CameraXBasic,可以在 Github 上找到),并希望将图像捕获为位图,以便能够在保存图像之前对图像进行一些修改。有没有人有关于如何实现这一目标的建议?
请参阅下面的谷歌原始代码来捕获和保存图像:
// Listener for button used to capture photo
controls.findViewById<ImageButton>(R.id.camera_capture_button).setOnClickListener {
// Get a stable reference of the modifiable image capture use case
imageCapture?.let { imageCapture ->
// Create output file to hold the image
val photoFile = createFile(outputDirectory, FILENAME, PHOTO_EXTENSION)
// Create output options object which contains file + metadata
val outputOptions = ImageCapture.OutputFileOptions.Builder(photoFile)
.build()
// Setup image capture listener which is triggered after photo has been taken
imageCapture.takePicture(
outputOptions, cameraExecutor, object …Run Code Online (Sandbox Code Playgroud)