How to Make Laser Projection Virtual Keyboard

47,113

131

34

Introduction: How to Make Laser Projection Virtual Keyboard

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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The Laser Projection Virtual Keyboard Designed

You need:

Image camera: $ 20 (USD)

Keyboard projection laser: $ 38(USD)

Infrared filter: $ 6.1 (USD)

linear laser: $ 54 (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

Be the First to Share

    Recommendations

    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest

    34 Discussions

    0
    MerryB6
    MerryB6

    1 day ago on Step 1

    Can I get your code with this laser projection keyboard please I need it
    Thank You

    0
    Utkarsha Desai
    Utkarsha Desai

    Question 2 months ago

    Where could I get the products?

    0
    fichadiashivam
    fichadiashivam

    7 months ago

    please send me the opencv code at @ fichadiashivam@gmail.com. I am also working on this project and would like to look at the project from your perspective.

    0
    lodong
    lodong

    10 months ago

    공개 CV를 보내 주시겠습니까?
    네가 나와 행복 할거야.
    내 이메일 주소는 kdh12324664@gmail.com

    0
    Mahan04
    Mahan04

    Question 1 year ago

    How to make the laser projector thoug? For the keyboard pattern please someone answer

    0
    katie788
    katie788

    2 years ago

    amazing job out there. I'm looking for something similar to this so please if u can mail me the code on my email koolkatie788@gmail.com .

    0
    Aryan77
    Aryan77

    Question 2 years ago on Step 1

    Can you please provide the name of all the parts in detail ? What laser and what camera to use ?

    0
    Sunset1z
    Sunset1z

    2 years ago

    Nice work for your project! Could I get the OpenCV code as well? I would like to build a similar device like this. my project is this semester please help me out. thanks. God bless you

    My email is : richrich693@gmail.com

    0
    Aryan77
    Aryan77

    Reply 2 years ago

    hey @Sunset1z did you got the open cv or any related products ?

    0
    TrungP15
    TrungP15

    2 years ago

    Hi there,

    Could you please send me the OpenCV code at email : trungphamthanh86@gmail.com ?

    Thanks in advance.

    0
    edma.analoua
    edma.analoua

    2 years ago

    I was wondering if I could get the OpenCV code, I was doing this for a school project. My email is edma.analou.a@gmail.com

    0
    G.H.Q.D.mafiaWolf
    G.H.Q.D.mafiaWolf

    2 years ago

    The keyboard pattern of you is not quite same as keyboard pattern in taobao. :'(

    0
    Ap amit
    Ap amit

    2 years ago

    Hi..I'm very much interested in this project. Can you please send me the openCV??? My email is apc3777@gmail.com

    0
    durvesh123
    durvesh123

    3 years ago

    can i get open cv for this project , my email id is kunal.golvankar@gmail.com

    0
    Sung WooH1
    Sung WooH1

    3 years ago

    Nice work for your project! Could I get the OpenCV code as well? I would like to build a similar device like this.
    My email is : ihansw@gmail.com

    0
    500934
    500934

    3 years ago

    I was wondering if I could get the OpenCV code, I was doing this for a school project. My email is presidentpinecone777@gmail.com

    Thank you :D

    0
    theawesomemt
    theawesomemt

    3 years ago

    Can I get one of these kits? Are you reselling it?

    0
    513696765
    513696765

    Reply 3 years ago

    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

    0
    TonyR87
    TonyR87

    3 years ago

    i can't make program run correctly. can you send me openCV code my email is daggerincoat@gmail.com