Download
web cam system development kit n.
Skip this Video
Loading SlideShow in 5 Seconds..
Web Cam System Development Kit PowerPoint Presentation
Download Presentation
Web Cam System Development Kit

Web Cam System Development Kit

95 Views Download Presentation
Download Presentation

Web Cam System Development Kit

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Web Cam System Development Kit Drew Demerath http://compsci.snc.edu/cs460/demedm

  2. Project Description • Develop a packaged system development kit that provides easy access to common web cam services • Requirements: • Able to work in C++ and Visual BASIC • Used across the curriculum • Add new and exciting features

  3. Project Description Cont. • First I received the Logitech QuickCam Pro 3000 • Went off of previously written code • Dove into the project…(BIG MISTAKE) • Started over, but first understood the process of the camera • Developed a laundry list of features for the camera

  4. Project Description Cont. • Issues I did not solve: • Adjusting gain and camera zoom • Save image as .jpg • Capturing frame and showing it before saving the image • Allow for multiple cameras

  5. How The Camera Functions • Process of developing camera image: 1) Camera driver calls framecallback code 2) Framecallback either manipulates the data or leaves it alone 3) Image is then put back into memory 4) User sees the image on the screen

  6. How The Camera Functions

  7. Sends Image Framecallback B & W Set Pixel Get Frame User Call Back Sends Manipulated Image

  8. A Further Look Into Framecallback… • Framecallback is the function that the camera driver calls. This can be set to a designated function, such as a user function • It can manipulate the data of the image or just leave the image alone • First it builds a global array of raw bytes, called VideoData. • Each pixel is composed of Red, Green, Blue

  9. Image to VideoData

  10. Blue Green Red Blue Green VideoData

  11. What Now?? • Global variable called ddcamcmd • Represented by a string of 0’s: 00000000 • Manipulation may begin now by setting “flags” or 0’s within ddcamcmd • Black and white 00000001 • Setting a pixel 00000010 • Getting a single frame 00000100 • Calling a user-defined callback 00001000

  12. Multi-Processing • Another way to access the data?? • There are functions that do not depend upon the framecallback. • So in an essence, I have multi- processing occurring. • One is processing the framecallback and the other is processing the “non-framecallback” functions.

  13. For Example… • To open and close the camera, does not deal with the framecallback. • Setting the preview rate • Resizing the camera • Saving an image • Interesting problem and solution here • Setting a pixel and getting a pixel

  14. How “Non-Framecallback” Works • Open, Close, Preview Rate, and Resize • Calls pre-defined Macros • Save, Set and Get Pixel • Uses global variable VideoData

  15. DEMO TIME….

  16. How Did I Do This? • Best learning technique • Experimentation • Previous classes…especially CS225: Machine Organization and Assembly Language • CS370: Operating Systems • CS professors • Windows programming

  17. Extensions • Save image as .jpg • Allow user to see the frame they want to save, before saving it • Allow for multiple cameras • Audio with images?? • Streaming video

  18. Advice • Start early • Get help when stuck, “No question is a dumb question” • If one professor is busy, try another one • Know what you are doing first • Did I mention… START EARLY?!!?

  19. QUESTIONS?