Active Server Pages, Script & the Web Cam

Download Report

Transcript Active Server Pages, Script & the Web Cam

Active Server Pages,
Script & the Web
Cam
By: Shara Rell
CS 460:
Senior Capstone Experience in CS
Dr. David Pankratz
May 8, 2001
Project Definition
Description:
•Design and launch a web server that uses active server pages
in an application
General Requirements:
• Research and purchase or secure the necessary equipment and
software to implement ASP
•Learn VB Script or Java Script and write a test web server
•Server must collect specific requests from clients (input) and
react based on that input
•Design and implement a real-time web server using ASP
•Animate the application over time
What is ASP?
•Definition:
-Files that contain both HTML and script code (VB Script or
Java Script) and can make calls to components in other
languages like database tables or ActiveX objects
-Technology built directly into Microsoft Web servers
-Script is automatically compiled when page is loaded
•Java Script VS VB Script
-Client Side Script: executed on the client
-Server Side Script: executed on the server
-What difference does it make where the script is executed?
Why Not Video Streaming?
•Other sites with Web Cams
-Did find a single site with actual video streaming
-Some had automatic update while others had a refresh button
•Much too complex
-Graduate programs that deal only with video streaming
-Madison: sending only some of the information and then using
algorithm to fill in the missing areas
•Didn’t have the appropriate equipment
-Needed encoder and decoders
-School lab doesn’t have the equipment to support it
Strategy for Success
•Basic Idea
Image Copy Program
Web Cam
Capture Program
Camera software
that will automatically
take the picture
and upload it to the
web server.
VB program that
will copy the image taken
from the camera
to one of 100 files.
Client
Client
Loaded with most
current pic. Every ?
Seconds, automatically
updated with newest pic.
Or have button that will
get newest pic for user.
Loaded with most
current pic. Every ?
Seconds, automatically
updated with newest pic.
Or have button that will
get newest pic for user.
Web server
Contains the
pictures,
html, ASP.
Problems
•Not sure how to store the images for later use
-Camera program will automatically take an image and store it in
a file but keeps storing in same file
•Racing Conditions
-Have camera program save image in one file and then have
another program copy that image to a bunch of different files?
- can’t read and write to same file at the same time
•How do we get the image files on the web server?
-FTP from computer to computer
•What web server are we going to use?
•SNCUW, PWS, NT, YAHOO, ….
Personal Web Server (PWS)
•What is PWS?
-Turns your computer into a miniature web server
-Creates virtual directories that can be linked to anywhere on
your computer (C:\MyDocuments or G:\Pankdc)
•Where to get PWS?
-Comes with Windows 95, 98
•Why use PWS?
-Can work on projects at home without constantly uploading
them to a web server
-Others can see what you’re working on if connected to network
-Easy to install and use
Image Swapping
•No Good VB Script samples
-Document.Write(“IMG SRC=“Image1.jpg”>)
•Java Script Samples
-WM_ImageSwap(ImageName, NewSource)
-OverMouse Hyperlink
<AHREF="#picture"onmouseover=document.visible.src=imgSrc[0].src >
-Document.Write(“<IMG SRC=“Image1.jpg”>”)
-creates a new image on the page with the given source
-Document.ImageName.Src = “Image1.jpg”
-changes the source of the image called ImageName
Java Movie Player
Launch()
Animate()
Fwd()
Stop()
Rev()
AnimateFwd()
GoToImage()
AnimateRev()
Array of Images
ChangeSpeed()
ChangeMode()
1
2
+-
3
...
•setTimeout(function, delay)
Update( )
Similar To:
While (True) {
Statement;
Statement;
Statement;
Statement;
Update();
Statement;
Statement;
Alarm(delay);
}
setTimeout (“Update();”, delay);
ALARM
Server View
Web Cam
Image
Capture
Program
Image
Image
Image
30 Seconds Later…
VB
Copy
Program
Web Cam
Image
Capture
Program
Image
Image
VB
Copy
Program
Client View
Client 1
Launch()
Web Server
C:\Inetpub
Stop()
StartUpdate()
Stop
Play
Image
+Client 2
Update()
ChangeSpeed()
Launch()
Stop()
StartUpdate()
Stop
Play
+-
Update()
ChangeSpeed()
What?!
?
Learning & Development Process
•Best Learning Technique - where I found answers
-INTERNET!!!!
-Other People
•Knowledge - what MT/CS courses were most helpful
•Further Research or Enhancements?!
-Video Streaming???
•Advice for Next Year Seniors
-Don’t put things off
-Can’t get it, just ask!
•Overall Experience
Capture Programs
•Easy Free Web Cam
-http://www.msagentsoftware.com/easyfreewebcam/index.html
-Written by college group in Germany
•IBM Net Camera
-Free with IBM Net Camera
•WebMedia
-www.microsoft.com/windows/windowsmedia/en/wm7/encoder.asp
-Couldn’t get it to work properly
Resources
•Books
-Active Server Pages by Morneau and Batistick
•Useful Web Sites
-http://www.realnetworks.com/products/producer/info.html
-http://www.playstream.com/home/3minute.asp
-http://www.vivo.com/products/playfree/vaplayer.htm
-http://msdn.microsoft.com/scripting/default.htm?jscript
-http://www.4guysfromrolla.com/webtech/
-http://www.faqts.com/knowlegde-base/index.phtml/fid/53/
-http://www.deja.com/usenet/
-http://www.webmonkey.com
Web Cam
•PC Cam VS Web Cam
-Make sure it supports video streaming
•Record small video file or capture still frames
-.AVI (Microsoft) files or .RAM files (RealPlayer)
-.JPG, .BMP ???
•USB Hook Up
•Other Specifications
-Resolution
-Speed
-Picture quality