loading

The laser projection virtual keyboard designed in this thesis is based on OpenCV combine with image camera, 980nm linear laser, 980nm infrared filter and Keyboard projection laser, the image camera detection used with 980nm infrared filter is caused by shielding finger to make 980nm linear laser diffuse reflection the light . By detecting and locating the center position of the light outline to discern and detect the position of finger and then map to keyboard position to achieve relative keyboard key events. With OpenCV vision library, it is fast to find the finger outline which is get by image camera, the position of finger location and revise the image surface distortion which is caused by image camera. By using OpenCV, the bottom hardware drive code written can be reduced, and invoke built-in function can directly face to hardware write code to fasten the difficult and speed of program development. By experiment and test, this virtual keyboard can correctly and accurately locate and detect the finger position, on the other hand, this keyboard also have fault-tolerant treatment, and finally realize the function of key input.

Step 1: The Laser Projection Virtual Keyboard Designed

You need:

Image camera: ¥50 (CNY) ≈ $ 8.1 (USD)

Keyboard projection laser: ¥38 (CNY) ≈ $ 6.1 (USD)

Infrared filter: ¥38 (CNY) ≈ $ 6.1 (USD)

linear laser: ¥10 (CNY) ≈ $ 1.6 (USD)

Step 2: How to Work

At the bottom of the infrared laser emission from a surface of a covering space in the infrared range, of course this plane to cover the entire keyboard, a keyboard in the center of the keyboard is the projection contour shape of the keyboard is mainly used for calibration, at the top of the real-time camera outside the graphics and pass data to the computer, because the laser light is a horizontal and parallel so no object occlusion camera is unable to detect the infrared signal, but if there are objects in the infrared laser region when the occluded objects' surface will be covered with the infrared camera will detect the infrared signal, computer access to the signal sent by the camera after after a certain the algorithm to obtain coordinates in the picture of infrared spot and then put the coordinate mapping to real keyboard position so as to realize its function.

Step 3: Choose Camera Lens

The camera of detection of the same area, ‘Camera2’ is angle of view 150°need height is 'h2', and the ‘Camera1’is angle of view 90°need height is 'h1', in order to narrow the project size and choose the lens of angle of view 150°.

Step 4: Calibration the Camera Lens

The picture taken by use the angle of view 150 camera is a distortion, and in order to Calibration the distortion of the picture using Matlab camera Calibration tool ‘Calibration Toolbox Camera’.

Step 5: The Camera Calibration Toolbox

Although "the camera calibration toolbox" as long as 3 different angles to shoot photos can be a good camera calibration, but in this design used 9 different angles to shoot photos of the camera calibration the calibration parameters, the parameters are applied to opencv correction algorithm in real-time operation can be real-time correction of distortion of the picture.

The following link is the algorithm paper and ‘camera calibration toolbox’ guide

http://www.vision.caltech.edu/bouguetj/calib_doc/
http://research.microsoft.com/en-us/um/people/zhang/Calib/

Step 6: Lens Process

The PC camera is visible and infrared detection are not allowed to enter because the infrared light in practice may cause the whole picture of the color fidelity, PC camera in the design of the product design manufacturers often use infrared filters in the infrared light environment, in this project need to detect the infrared signal is so PC camera behind add a layer of infrared filter, this filter can filter out visible light infrared light and visible light are only allowed to enter, because of the use of this system is the 980nm infrared laser, so the permeability of 980nm filter, this filter can filter the 980nm light for more than 980nm light has good permeability.

Step 7: Why Choose Linear Laser

Select the 980nm infrared linear laser as the source of the signal detection, the linear laser can cover all the keyboard range.

Step 8: PC Software

The development of software is Visual Studio 2010 and OpenCV library.

Step 9: Programming and Algorithm

Use cvCaptureFromCAM () function and cvQueryFrame () function to get the camera image,Using the cvCvtColor () function binarization the image,Use findContours () function to find the object contour, drawContours () function to draw the object contour, boundingRect () function to draw the object contour of the rectangle

Step 10: Test

Press space key the PC will check the key

Hi..I'm very much interested in this project. Can you please send me the openCV??? My email is apc3777@gmail.com
<p>can i get open cv for this project , my email id is kunal.golvankar@gmail.com </p>
<p>Nice work for your project! Could I get the OpenCV code as well? I would like to build a similar device like this. <br>My email is : ihansw@gmail.com</p>
<p>I was wondering if I could get the OpenCV code, I was doing this for a school project. My email is presidentpinecone777@gmail.com</p><p>Thank you :D</p>
<p>Can I get one of these kits? Are you reselling it?</p>
Are you interested in this project?because i am a Chinese ,this is my graduation design,but I can help you to order all the components sent to you in China.my E-mail is 513696765@qq.com
<p>i can't make program run correctly. can you send me openCV code my email is daggerincoat@gmail.com</p>
<p>I just don't seem to find the components anywhere.. the DIY kit is out of stock on almost all the sites and aliexpress cancelled the order. can you please tell me where can I find all the components?</p>
<p>Can I get the OpenCV code too? my email address is jainkkritika.km@gmail.com</p>
<p>This is a wonderful project, I would also very much appreciate the OpenCV code if you still have it around. If you can, send it my way via personal message or email. </p><p>Thanks so much in advance</p>
<p>Maybe you can send an E-mail to me,i very glad to by E-mail send the OpenCV code to you ! my E-mail address is 513696765@qq.com</p><p>good luck !</p>
<p>Hello I am really impressed by your work!</p><p>Could you please send me your code for an OpenCV?</p><p>I have succeeded calibrating by using MATLAB</p><p>But I am stuck in OpenCV. I need your help right now.</p><p>My adress is 'kimbou71@gmail.com'<br> Thank you</p>
<p>i need to know how can i get keyboard projection laser? and what coding needs to be done if possible?</p>
<p>Hi guys !because I am a Chinese user, all the devices are bought from <br>Taobao, Taobao is China's online shopping sites like Amazon, I provide <br>you with the product website does not know Chinese businesses will send <br>overseas express, Taobao has overseas website Alibaba you can find a <br>lower whether you want the cheap devices.</p><p><strong>The keyboard projection laser don't need coding ,power supply direct current 3.3V can get the shape of the keyboard,the keyboard and laser projection module is like a slide projector.</strong></p><p><br>The device's shopping site is as follows<br><br>Keyboard projection laser websites:</p><p><a href="https://item.taobao.com/item.htm?spm=a1z09.2.0.0.8TuGpn&id=10243870309&_u=1jtpmjed0d2" rel="nofollow">https://item.taobao.com/item.htm?spm=a1z09.2.0.0.8...</a><br>Infrared filter websites:</p><p><a href="https://item.taobao.com/item.htm?spm=a1z09.2.0.0.8TuGpn&id=8756969933&_u=1jtpmje26a0" rel="nofollow">https://item.taobao.com/item.htm?spm=a1z09.2.0.0.8...</a><br>linear laser website:</p><p><a href="https://item.taobao.com/item.htm?spm=a1z09.2.0.0.8TuGpn&id=3341601563&_u=1jtpmjef68a" rel="nofollow">https://item.taobao.com/item.htm?spm=a1z09.2.0.0.8...</a><br>Image camera website:</p><p><a href="https://item.taobao.com/item.htm?spm=a230r.1.14.16.6XjW8y&id=35853322184&ns=1&abbucket=9#detail" rel="nofollow">https://item.taobao.com/item.htm?spm=a230r.1.14.16...</a><br><br>Good Luck !</p>
<p>Where can i buy this????</p>
<p>Hi guys !because I am a Chinese user, all the devices are bought from <br>Taobao, Taobao is China's online shopping sites like Amazon, I provide <br>you with the product website does not know Chinese businesses will send <br>overseas express, Taobao has overseas website Alibaba you can find a <br>lower whether you want the cheap devices.<br><br>The device's shopping site is as follows<br><br>Keyboard projection laser websites:</p><p><a href="https://item.taobao.com/item.htm?spm=a1z09.2.0.0.8TuGpn&id=10243870309&_u=1jtpmjed0d2" rel="nofollow">https://item.taobao.com/item.htm?spm=a1z09.2.0.0.8...</a><br>Infrared filter websites:</p><p><a href="https://item.taobao.com/item.htm?spm=a1z09.2.0.0.8TuGpn&id=8756969933&_u=1jtpmje26a0" rel="nofollow">https://item.taobao.com/item.htm?spm=a1z09.2.0.0.8...</a><br>linear laser website:</p><p><a href="https://item.taobao.com/item.htm?spm=a1z09.2.0.0.8TuGpn&id=3341601563&_u=1jtpmjef68a" rel="nofollow">https://item.taobao.com/item.htm?spm=a1z09.2.0.0.8...</a><br>Image camera website:</p><p><a href="https://item.taobao.com/item.htm?spm=a230r.1.14.16.6XjW8y&id=35853322184&ns=1&abbucket=9#detail" rel="nofollow">https://item.taobao.com/item.htm?spm=a230r.1.14.16...</a><br><br>Good Luck !</p>
<p>me too I need to know them</p>
<p>Can somebody tell if we can use a transparency film instead of Diffractive Optical Element in the projection module??</p>
<p>I want to build this, but i can't find a cheap projection module for that. Can you please suggest me some websites from where i can order this ?</p>
<p>Nice project. I always wondered how a virtual keyboard works. Thanks for sharing.</p>
<p>This is really cool!</p><p>But the camera and laser structure is right in front of the monitor . . . Have you figured out a way to make this work with that not in the way of your screen?</p>

About This Instructable

27,702views

115favorites

License:

More by 513696765:ESP8266(NodeMCU) Weather Station Ues Python Code Monitoring the Global Earthquake How to make laser projection virtual keyboard 
Add instructable to: