简体   繁体   English

是否可以拍摄图像(或图像序列)并将其作为硬件设备(网络摄像头)使用C ++ / OpenFrameworks传递给Mac OSX?

[英]Is it possible to take an image (or sequence of images) and pass it to Mac OSX as a hardware device (webcam) using C++/OpenFrameworks?

Pretty new to oF and C++, but trying to open up communications between Flash (AS3) and a Canon DSLR. oF和C ++相当陌生,但是尝试开放Flash(AS3)和佳能DSLR之间的通信。 We've successfully done it using a socket server (using https://github.com/roxlu/ofxFlashCommunication ), so AS3 can trigger the DSLR's shutter, get the image path, etc. But we want to turn the live view preview (which is easy to view in the C++ app using Canon's SDK) into a webcam stream so that Flash can display a preview (via AS3's native Camera and Video classes) to the user. 我们已经使用套接字服务器(使用https://github.com/roxlu/ofxFlashCommunication )成功完成了此操作,因此AS3可以触发DSLR的快门,获取图像路径等。但是我们想打开实时预览(通过使用佳能的SDK在C ++应用中可以轻松地将其查看)到网络摄像头流中,以便Flash可以向用户显示预览(通过AS3的本机Camera和Video类)。 Unfortunately, passing the live view image data through the socket server is not an option as that requires converting the image to a byte array, passing it to flash, and having flash parse that back into an image. 不幸的是,通过套接字服务器传递实时取景图像数据不是一种选择,因为这需要将图像转换为字节数组,将其传递给Flash,并让Flash将其解析回为图像。 That method was way too slow (low FPS). 该方法太慢(FPS较低)。

Current OS: Mac OSX 10.8.3 当前操作系统:Mac OSX 10.8.3

What is the best way to get the live view from C++ to Flash? 从C ++到Flash实时取景的最佳方法是什么? Is there an easy to use library for oF/C++ that can help me turn a sequence of images (in real time) to a native hardware webcam stream? 是否有一个易于使用的oF / C ++库,可以帮助我将一系列图像(实时)转换为本地硬件网络摄像头流?

There is a soft that can open a Canon DSLR and turn into an AS3 native camera http://sparkosoft.com/ 有一个可以打开佳能单反相机并变成AS3本机相机的软件http://sparkosoft.com/

Unfortunately it doesn't seem to respect the frame rate settings on the cam. 不幸的是,它似乎并没有考虑到凸轮上的帧频设置。 I don't know if theres is a hardware limitation which wouldn't allow for 60fps. 我不知道是否存在不允许60fps的硬件限制。

Maybe this will get you closer to where you want. 也许这会使您更接近所需的位置。 If you're able to get it working @60fps let me know http://www.monday8am.com/en/2012/05/29/canoneos_lib_extension/ 如果您能够使其以@ 60fps的速度工作,请告诉我http://www.monday8am.com/en/2012/05/29/canoneos_lib_extension/

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

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