( From:http://blog.trumpton.org.uk/2009/02/webcam-manipulation-with-javascript.html )
I purchased an IcamView web server, and megapixel webcam, which I have waterproofed, and placed in the garden.
The IcamView web server has a low power processor, and is unable to manipulate the images at all. When you use the ActiveX or Java video viewer, the viewer manipulates the image for you (on the client PC).
If you access still frames, you have no such tool, and the frames come straight from the camera, warts and all. The most obvious issue is when images are flipped by the camera, and it expects the software to flip the images back.
I have created a Javascript file (webcam.js), which can post-process images from webcams. It is intended for people who don't know or want to know how to perform any Javascript programming.
Adding the Code in your HTML File
All you need to do is use your favorite web editor, and include the Javascript, a webcam tag, and a normal img tag for backwards comatibility with non-Javascript capable browsers.
<script language="javascript" src="webcam.js"></script>
<webcam src="http://www.trumpton.org.uk/webcam/garden0.jpg"
graceful="yes" errsrc="http://www.trumpton.org.uk/webcam/offline-320x200.jpg" alt="Tomy Cam" showdate="yes" bgc="black" fgc="white" refresh="310" />
<noscript><img class="webcam" src='http://www.trumpton.org.uk/webcam/garden0.jpg' alt="Tomy Cam" /></noscript>
The Code all belongs in the <body> section of the web page.
- The <script> tag loads the Javascript file.
- The <webcam> tag is interpreted by the script, and loads / edits the image.
- The <noscript> tag is ignored by browsers that can process Javascript, and handled by any other ones - the images displayed on these browsers will not be flipped / rotated or labelled.
More Information
More information, including the source code, can be found here.
分享到:
相关推荐
Title: Internet of Things Programming with JavaScript Author: Ruben Oliva Ramos Length: 407 pages Edition: 1 Language: English Publisher: Packt Publishing Publication Date: 2017-03-06 ISBN-10: ...
jQuery Webcam这个插件为直接在JavaScript中与摄像头通信提供了一个透明的访问层。它通一个SW文件与摄像头交互,可以显示Webcam输出和捕捉图象。如果有多个摄像头,它可以显示可用的摄像头列表,然后供用户选择其中...
基于Linux的WebCam驱动基于Linux的WebCam驱动基于Linux的WebCam驱动基于Linux的WebCam驱动
webcam-capture jar文件打包带走。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
使用jQuery-webcam摄像头拍照demo,实现了在web页面调用摄像头的开发
webcam-capture-0.3.12.jar,调用摄像头使用 -
WEBCAM软件
参照webcam-capture开源项目,我实际写了个java调用摄像头拍照的例子 在以下环境中测试通过: java 1.8 Windows7 64
这是用unity利用webcam拍照的代码
jQuery webcam plugin是一个在ie,firefox,...在一些业务需求下,如用摄像头拍证件照等,需要更高分辩率的图,此文件为jQuery webcam高清版600*450,这也是最高清版本,使用此文件,支持IE浏览器打开摄像头拍摄照片
jQuery-webcam分辨率640*480。jQuery webcam plugin是一个兼容各浏览器的摄像头插件,资源根据官网(http://www.xarg.org/project/jquery-webcam-plugin/)下载的源码和网上的Demo做了部分修改,主要解决以下问题:1...
Webcam原理介绍
jquery插件jquery.webcam 实现拍照功能
支持 S5PV210开发板 6410开发板 嵌入式 WebCam摄像头测试程序,测试代码
webcam capture picutre,save as bmp,jpg,png,gif...as support by CImage class which from MFC/Microsoft
一个webcam_v4l2的演示:包含两部分: 1. webcam_server: 抓v4l2, 压缩,发送 2. webcam_shower: 接收,解压,回放
java swing 调用webcam 显示全屏视频图像,支持接收Socket指令拍照无卡顿、无设备占用冲突、支持配置端口配置图片保存地址、支持切换窗口模式、视频图像始终前置模式,避免弹窗影响、支持图片旋转角度调整、支持开机...
eos utility webcam beta
基于WebCam的人脸识别与跟踪系统设计解决方案.doc
visual basic webcam detector