zoukankan      html  css  js  c++  java
  • IM 学习记录

    Capture Guide

    Using

    list the installed capture devices: imVideoCaptureDeviceCount, imVideoCaptureDeviceDesc
    使用数字索引。

    更新设备信息源imVideoCaptureReloadDevices。

    访问设备需imVideoCapture=imVideoCaptureCreate(),无参数/独立。
    一个设备调用一次,配合imVideoCaptureDestroy(vc:Destroy)。

    imVideoCaptureConnect(imVideoCapture)(vc:Connect)-imVideoCaptureShowDialog(系统提供的配置对话框)。vc:Disconnect

    实时拍摄-截取帧,imVideoCaptureLive/imVideoCaptureFrame;停止-拍摄1帧-停止,imVideoCaptureOneFrame。

    数据结构同imFileReadImageData。

    其他,imVideoCaptureGetImageSize。

    Building

    require"imlua_capture"。独立。

    CaptureSamples-Capture SamplesCapture and IUP

    iupglcap.zip没在im-3.15_Examples.zip。
    去网页版的IM帮助找到链接,是c语言的vc工程,先不看了..

    CaptureReference

    两部分:功能函数与结构(对应im_capture.h)Windows Attributes Names-imVideoCaptureGetAttribute。

    basic and extendend device description <string>, using device number, im.VideoCaptureDeviceDescim.VideoCaptureDeviceExDesc.
    <string>=im.VideoCaptureDevicePathim.VideoCaptureDeviceVendorInfo.

    <number>=vc:DialogCount(); <string>=vc:DialogDescvc(number) :ShowDialog(<number>,nil).

    <number>=vc:FormatCount, available video formats. error<bool>,width,height<number>,des<string>=vc:GetFormat.
    vc:SetFormatvc:SetImageSize

    capture vc:Frame(imImage,timout)vc:OneFrame,涉及color space、data type等。
    vc:Live

    <string>=vc:GetAttributeListvc:ResetAttributevc:GetAttributevc:SetAttribute(percent)
    均需用GetAttribute检查是否可用(而非依赖list的结果)。

     实践

    there is no capture device available. count=0。

    得将手机转换为USB cameras Webcams。
    尝试DroidCam - Webcam for PC - Google Play 應用程式、(官网)Dev47Apps
    另有DroidCamX(付费,不确定差异,低画质,貌似电脑端控制手机摄像头)。
    参见:Help | Dev47Apps(含命令行调用)。

    添加后VideoCaptureCreate不再返回空,不过数量还是0,是由于被占用的原因?
    应该不是,因为DroidCam和QQ等能同时使用。

    尝试USB连接,软件工作正常,但程序问题依旧。

    跳过VideoCaptureDeviceCount,强行指定索引正常。
    需使用im.VideoCaptureReloadDevices()(而非VideoCaptureDeviceCount,但先前者,后者值亦正常)

    有些字段为空(而非结果为空),如。

    运行时会弹出窗口

     CD - Canvas DrawGuideCDLua+IMLua

    require'cdlua'require'imlua'require"cdluaim"

    持续捕获会爆栈(不会丢弃?)。
    使用image:Clear()iup.Destroy(ih)

    imImage.sizeimImage.data为开放(相应的有image:Width()

     实践

    可通过vc:DialogCountvc:DialogDescvc:ShowDialog

     


    获取设置对话框(但可能会失败,如以上的Source..

     IM - An Imaging ToolProcessingReferenceImage Statistic

    RMS error-Root Mean Square Error-均方根差;SNR-Signal Noise Ratio-信噪比。
    各种分布统计求解函数..

    每一层(depth plane)相当于PS概念中的通道(channel),其中描述一个颜色维度。

    ..Image Analysis

    Find white regions in binary image. 4 connected or 8 connected(neighbors)(上下左右4方向、加上4角)

    计算连通域、洞、面积、面心、周长等。

    其他

    game/gamma,亮度、灰度曲线比例调整。

    通式调整函数imProcessToneGamut using IM_GAMUT_XXX(使用不同参数)。

  • 相关阅读:
    Java的synchronized的同步代码块和同步方法的区别
    关于java字节码框架ASM的学习
    说说cglib动态代理
    Java虚拟机-JVM各种参数配置大全详细
    Permanent Space 和 Heap Space
    OOM三种情况
    Java性能调优(一):调优的流程和程序性能分析
    数学之路-python计算实战(17)-机器视觉-滤波去噪(中值滤波)
    使用 Pascal 脚本编写网页, PWP 项目
    android 4.0主线程訪问网络问题
  • 原文地址:https://www.cnblogs.com/RobertL/p/15060105.html
Copyright © 2011-2022 走看看