- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
使用 _capture.SetCaptureProperty(CapProp.Exposure, x)
没有错误,但不能对我的相机起作用。任何关于在 Emgucv 设置曝光的想法。
相机型号:Basler (acA1300-30gm)
运行代码后没有变化。
_capture.SetCaptureProperty(CapProp.XiExposure, 30000.0);
_capture.SetCaptureProperty(CapProp.Exposure, 30000.0);
_capture.SetCaptureProperty(CapProp.XiExposureBurstCount, 30000.0);
最佳答案
我还发现 Basler 相机无法设置捕获属性,我编写应用程序的方式是使用免费的 Pylon 运行时 SDK 来捕获要传递给 Emgu CV 的帧。该项目的以下片段应该可以帮助您入门:
using Basler.Pylon; // You'll need to add a reference to Basler.Pylon.DLL as well
var cam = new Camera();
cam.Open();
Console.WriteLine("Using camera {0}.", cam.CameraInfo[CameraInfoKey.SerialNumber]);
cam.Parameters[PLCamera.ExposureTimeAbs].SetValue(1000, FloatValueCorrection.ClipToRange);
cam.StreamGrabber.ImageGrabbed += OnImageGrabbed1;
cam.StreamGrabber.Start(GrabStrategy.OneByOne, GrabLoop.ProvidedByStreamGrabber);
private void OnImageGrabbed1(object sender, ImageGrabbedEventArgs e)
{
IGrabResult grabResult = e.GrabResult;
if (grabResult.GrabSucceeded)
{
using (Bitmap bm = new Bitmap(grabResult.Width, grabResult.Height, PixelFormat.Format32bppRgb))
{
BitmapData bmpData = bm.LockBits(new Rectangle(0, 0, bm.Width, bm.Height), ImageLockMode.ReadWrite, bm.PixelFormat);
converter.OutputPixelFormat = PixelType.BGRA8packed;
IntPtr ptrBmp = bmpData.Scan0;
converter.Convert(ptrBmp, bmpData.Stride * bm.Height, grabResult);
bm.UnlockBits(bmpData);
using (Image<Bgr, byte> imageCV = new Image<Bgr, byte>(bm))
{
// Example Emgu CV function
double mean = CvInvoke.Mean(imageCV.Mat).V0;
}
}
}
else
{
LogMessage($"Camera 1 error: {grabResult.ErrorCode} {grabResult.ErrorDescription}");
}
}
我一直在使用此代码以 40fps 的速度从他们的一台千兆摄像机处理实时视频,性能似乎不错。
关于c# - 如何在 EmguCV 中设置相机属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58744355/
我有一个程序可以从硬盘加载图像。程序使用emgu cv编写,图像为Bgr图像。我想允许用户增加/减少图像的亮度/对比度。我怎样才能做到这一点?一些示例代码将不胜感激(因为我仍然是新手)。谢谢。 最佳答
摘要: 我正在尝试从 emgu 中的 IP 摄像头获取视频,我可以在浏览器中显示来自“http://169.254.255.253”等 IP 的视频。 问题: 我如何从 emgu 显示这个? 最佳答案
阅读 EmgCV 文档无法完全理解:哪些检测器可以与哪些 DescriptorExtractor 一起使用? Here据说: You can use it with the FREAK descrip
首先让我说,我确实完整地遵循了许多教程,例如位于 EmguCv 主站点上的教程,但抛出了 TypeInitializationException。 现在,仔细听,因为这是非常奇怪的部分。我首先要说我的
如何使用 emgucv 向图像添加高斯噪声(具有特定的均值和方差)? 最佳答案 我不太确定您要问什么,因为高斯滤波器往往用于消除噪声。要使用自定义内核,您可以使用以下代码。如果您希望添加具有设定均值和
谁能告诉我 emgucv 2.3 中是否存在用于找出图像的傅立叶变换的内置函数? 提前致谢 最佳答案 从我的回答 Fourier Transform + emgucv 你所追求的函数是 CvInvok
我在 C# 中使用 Emgu。 我有一个来自相机提要的 jepg 流。目前,我使用 2 个图像之间的 absdiff 来获取运动变化。 Image _diffBetweenCurrentAndPrev
我在 C# 中使用 Emgu。 我有一个来自相机提要的 jepg 流。目前,我使用 2 个图像之间的 absdiff 来获取运动变化。 Image _diffBetweenCurrentAndPrev
我正在尝试制作一个程序来检测魔方的颜色 这是到目前为止我已经启动并运行的屏幕截图,我基本上使用了 emguCV 附带的边缘检测示例中的代码,并用它来检测小立方体(但正如你所看到的,一些小立方体没有被检
我是图像处理的新手。在我的应用程序中,我想检测并去除眼睛周围的皮肤。 在上图中,我想提取没有皮肤的眼部区域(和眉毛)。 首先,我尝试在从图像中移除皮肤之前执行皮肤检测。我用了AdaptiveSkinD
有没有办法减少openCv中的灰度图像的灰度? 通常我有一个从0到256的灰度值 Image inputImage. 就我而言,我只需要0-10的灰度值。我有没有使用OpenCV做到这一点的好方法,尤
谁能告诉我使用OpenCV / EmguCV 3.0的Capture功能时使用了哪些USB摄像机?我已经尝试过Trust Webcam 1080p和Gearhead WC8500HD 1080p摄像机
在我的应用程序中,我以最高350 fps的帧速率在线处理图像(1920x400)。从这些图像中,我连续计算出位于图片中间的黑色物体的面积。该物体通常没有几个白洞。 Example for you to
EmguCV是否提供任何内置功能将彩色图像转换为RG色度(see Wikipedia link)? 提前致谢。 最佳答案 至少在v3.1上,我在EmguCV中找不到任何内置方法。因此,我最终还是采用了
我有一个应用程序,它将用于从扫描的文档中裁剪空格,例如 this image .我想要做的是只提取卡片并删除所有白色/空白区域。我正在使用 Emgucv FindContours 来执行此操作,目前我
使用cvsobel函数时遇到一些问题。我已经读过cvsobel将图像深度从8位增加到16位... 有人可以帮我弄清楚如何将其缩放回8位... 我的代码是 Image grayImage = TestI
我正在针对视频(文件)运行运动检测算法并遵循代码示例运动检测,并试图找到每个组件的角度和整体运动。我确实得到了一个运动值,带有 Blob 等,但每个组件的运动方向始终是 0 度或 360 度,没有任何
我正在使用 EmguCV 从我定义如下的捕获顺序查询帧: Capture cap; private void Form1_Load(object sender, EventArgs e) {
我目前正在使用SURF算法(在EmguCV 3.1上)测试两个图像是否可能对应于同一位置Image 1及其非常暗的版本,这给我带来了以下两个问题: 1-您认为计算两张图片之间的匹配次数是否是确定图像相
我使用带有边缘检测器应用程序的EmguCV houghines来检测消融棒(来自带有红色和白色条纹的木材的棒),我需要知道如何获得以像素为单位的线长,例如:第一行长50px。 代码样本 class H
我是一名优秀的程序员,十分优秀!