virtualtouchscreen

271 views

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
271
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
1
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

virtualtouchscreen

  1. 1. Virtual Touch Screen This image is from a video http://in.youtube.com/watch?v=OTCWhraw2Xw
  2. 2. <ul><ul><li>Team Members </li></ul></ul><ul><ul><ul><ul><ul><li>K.JAGADEESH - 660752022 </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>V.PRASANTHI - 660752044 </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>K.SUPRIYA - 660752025 </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>K.CHANDRASEKHAR - 660752020 </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>M.CHAKRADHAR - 660752037 </li></ul></ul></ul></ul></ul><ul><li>Team Guide : Mercy Vinolia (Asst.Professor) </li></ul><ul><li>CSE Department </li></ul>
  3. 3. Objective <ul><ul><li>Objective of our project is to develop an application that provides a means of accessing the control of basic computer operations using a laser light and a webcam. </li></ul></ul><ul><ul><li>User normally handles his operations using mouse and keyboard. These may not be easiest way at every time. </li></ul></ul><ul><ul><li>Programming Language : C# in .NET Framework </li></ul></ul>
  4. 4. Components required <ul><ul><li>A laser pointer � for tracing location. </li></ul></ul><ul><ul><li>A webcam � which provides the external environment to the computer through video. </li></ul></ul>
  5. 5. Analysis <ul><ul><li>Webcam is located so that it exactly captures the projected area. </li></ul></ul><ul><ul><li>A red color laser light is preferred and external light effects should be minimum. </li></ul></ul><ul><ul><li>A webcam is installed with its driver. </li></ul></ul>
  6. 6. Block diagram avicap32.dll (to run webcam and save video as .avi format) AVIStreamGetFrame() (The frame data is returned as a packed DIB) Bitmap.Getpixel(x,y) brightness = (299 * red + 587 * green + 114 * blue) / 1000 User32.dll Mouse_event(dwflags,dx,dy,dwdata,dwextra) Transformation of x and y To the screen resolution
  7. 7. Identifying laser pointer <ul><li>for (int y = 0; y < imageHeight; y += 1) </li></ul><ul><li>{ </li></ul><ul><li>for (int x = 0; x < imageWidth; x += 1) </li></ul><ul><li>{ </li></ul><ul><li>byte red, green, blue; </li></ul><ul><li>red = Bitmap.GetPixel(x, y).red; </li></ul><ul><li>green = Bitmap.GetPixel(x, y).green; </li></ul><ul><li>blue = Bitmap.GetPixel(x, y).blue; </li></ul><ul><li>float brightness = (299 * red + 587 * green + 114 * blue) / 1000; </li></ul><ul><li>if (brightness > threshold) </li></ul><ul><li>{ </li></ul><ul><li>brightest = brightness; </li></ul><ul><li>xPos = x; </li></ul><ul><li>yPos = y; </li></ul><ul><li>brightnessFound = true; </li></ul><ul><li>} // x loop </li></ul><ul><li>}} </li></ul>
  8. 8. Transformation : <ul><li>cursorX = ((float)screenWidth / imageWidth) * xPos; </li></ul><ul><li>cursorY = ((float)screenHeight / imageHeight) * yPos; </li></ul><ul><li>Mouse LEFT CLICK : </li></ul><ul><li>Dllimport � User32.dll </li></ul><ul><li>mouse_event(MOUSEEVENTF_LEFTDOWN, cursorX, cursorY, 0, 0); </li></ul>

×