简体   繁体   English

网络摄像头图像以C ++形式存储到内存中

[英]Webcam images to memory in C++

I need a way to capture images from a webcam and store them in memory. 我需要一种从网络摄像头捕获图像并将其存储在内存中的方法。 I'm experimenting with object tracking. 我正在尝试对象跟踪。 (Wanting to write my self, I don't want a library for tracking.) (想写我自己,我不想要一个用于跟踪的库。)

I don't want to save to a .bmp and then reload into memory. 我不想保存为.bmp,然后重新加载到内存中。

I want something fast as I'll need to take images from the camera several times a second. 我想要快速的东西,因为每秒需要几次从相机拍摄图像。

I don't really want to use something like OpenCV as it's likely too slow for my useage and has many features I don't really need. 我真的不想使用像OpenCV这样的东西,因为它可能对于我的使用来说太慢了,并且具有我不需要的许多功能。 (Though if I'm wrong about it being slow, I may try it.) (尽管如果我对它运行缓慢感到不对,可以尝试一下。)

Thanks in advance. 提前致谢。

See here: http://www.dreamincode.net/forums/topic/193519-win32-webcam-program/ 看到这里: http : //www.dreamincode.net/forums/topic/193519-win32-webcam-program/

That should help you get images from the webcam. 这应该可以帮助您从网络摄像头获取图像。 After you get the webcam image, you can do whatever with it. 获取网络摄像头图像后,您可以对其进行任何处理。 Save it to file or keep the buffer. 将其保存到文件或保留缓冲区。 Up to you. 由你决定。

You can also try DirectShow or VLC. 您也可以尝试DirectShow或VLC。

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

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