【问题标题】:LiveCode: Capture still image from camera on a desktop computer?LiveCode:从台式计算机上的相机捕获静止图像?
【发布时间】:2015-01-09 19:55:50
【问题描述】:

如何使用 LiveCode 从台式计算机上的摄像头捕捉静止图像?

我正在使用此代码在移动设备上捕获图像:

mobilePickPhoto "front camera" ,100 , 100

【问题讨论】:

    标签: image camera desktop capture livecode


    【解决方案1】:

    首先使用外部视频采集器设置摄像头。

    revIinitializeVideoGrabber the short name of this stack,"QT","20,20,120,86"
    

    现在你可以抓取一个框架了:

    revVideoFrameImage 66,100,myPictureData
    

    并设置图像控件的 imageData:

    set the imageData of img 1 to myPîctureData
    

    现在例如将其导出为 PNG

    export img 1 to myPictureData as PNG
    

    您可以将 myPictureData 写入文件。

    revVideoGrabber 外部可能不适用于最新版本的 LiveCode。

    【讨论】:

      猜你喜欢
      • 2014-02-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-22
      • 2011-07-28
      • 2020-02-11
      • 2015-03-19
      相关资源
      最近更新 更多