Skip to content

The virtual keyboard design based on laser projection technology is based on OpenCV, it combines with hardware identification and detects the location of the finger position and then maps to the keyboard so as to realize the corresponding KeyPress.

hxy513696765/OpenCV-laser-projection-virtual-keyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCV-laser-projection-virtual-keyboard

The virtual keyboard design based on laser projection technology is based on OpenCV, it combines with hardware identification and detects the location of the finger position and then maps to the keyboard so as to realize the corresponding KeyPress.

How to Work?

    1. 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.

How to Work

How to Work


Hardware

Test

Test

Test

1. 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°. Choose Camera Lens

Choose Camera Lens

2. 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’.

Calibration the Camera Lens

3. 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/

Calibration the Camera Lens

Calibration the Camera Lens Calibration the Camera Lens Calibration the Camera Lens Calibration the Camera Lens Calibration the Camera Lens

4. 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.

Lens Process

5. 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.

Why Choose Linear Laser

Why Choose Linear Laser


Software

1. 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 Programming and Algorithm

2. Frist you should install Visual Studio 2010 and download OpenCV library (PS:my project use OpenCV 2.4.6 you can use 2.4.6+).

Image text

3. you must add the ‘OpenCV library’ to Visual Studio project

How to build applications with OpenCV inside the Microsoft Visual Studio

4. If you don't want to compile the code you can run "\OpenCV laser projection virtual keyboard\OpenCV Test\Debug\OpenCV Test.exe" the "OpenCV Test.exe" is my project compiled application ,if you run the application the PC must Plug in the USB camera to run the application again (PS: You must add all "OpenCV library.dll" ).

Image text

if you not add all "OpenCV library.dll" the application will not run successful. Image text

Image text Image text Image text

good luck !

About

The virtual keyboard design based on laser projection technology is based on OpenCV, it combines with hardware identification and detects the location of the finger position and then maps to the keyboard so as to realize the corresponding KeyPress.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages