Summary of the invention
In view of the above problems, the invention provides the virtual contactor control device of a kind of man-machine interactive that overcomes the problems referred to above or address the above problem at least partly, system and method.
The invention provides the virtual contactor control device of a kind of man-machine interactive, comprise indicative control unit and display unit, this device comprises:
View recognition unit, carries out hard recognition for the view data of the user's finger to camera collection, to determine the position of finger end points in image.
Surface level two-dimensional coordinate is set up unit, for the finger endpoint location that identifies according to this view recognition unit, in the position of image and the pixel resolution of camera, finger end points location of pixels is converted to the two-dimensional coordinate value of XZ coordinate surface.
Vertical plane two-dimensional coordinate is set up unit, for the finger endpoint location that identifies according to this view recognition unit, in the position of image and the pixel resolution of camera, finger end points location of pixels is converted to the two-dimensional coordinate value of YZ coordinate surface.
Three-dimensional coordinate computing unit, for according to this surface level two-dimensional coordinate, set up unit and vertical plane two-dimensional coordinate set up unit respectively definite finger end points location of pixels in the two-dimensional coordinate value of XZ coordinate surface and YZ coordinate surface, calculate finger end points at the coordinate figure of XYZ three-dimensional system of coordinate.
Action judging unit, for according to the band of position corresponding to each key mapping of D coordinates value and dummy keyboard of the finger end points of this three-dimensional coordinate computing unit calculating, judges the operation of user to dummy keyboard key mapping.And
Graphic plotting unit, for drawing out analog subscriber finger according to the judged result of this action judging unit at the application drawing picture of the corresponding key mapping of dummy keyboard, and calls this indicative control unit and controls this display unit and show this application drawing picture.
The present invention also provides a kind of man-machine interactive virtual touch-control system, comprise the virtual contactor control device of man-machine interactive described in as above any one and with two picture pick-up devices of this device communication connection.
The present invention also provides a kind of man-machine interactive virtual touch control method, and the method comprises:
User lies against in picture catching region finger is unsettled, and the view data of user's finger of camera collection is carried out to hard recognition, to determine the position of finger end points in image.
According to the position of finger endpoint location in image and the pixel resolution of camera that identify, finger end points location of pixels is converted to respectively to the two-dimensional coordinate value of XZ coordinate surface and YZ coordinate surface.
According to finger end points location of pixels, in the two-dimensional coordinate value of XZ coordinate surface and YZ coordinate surface, calculate the coordinate figure of finger end points in XYZ three-dimensional system of coordinate.
According to the band of position corresponding to each key mapping of D coordinates value and dummy keyboard of the finger end points of this calculating, the operation of judgement user to dummy keyboard key mapping.
According to this judged result, draw out analog subscriber finger at the application drawing picture of the corresponding key mapping of dummy keyboard.And
The image that shows this drafting is watched for user.
The virtual contactor control device of a kind of man-machine interactive provided by the invention, system and method, by camera, captured position and the posture of image identification finger end points, by the finger end points coordinate obtaining, be directly mapped as the operational motion to dummy keyboard, and on display, show and feed back to user, by intelligent glasses and intelligent bracelet, or the picture pick-up device fast construction dummy keyboard input environment on intelligent and portable mobile device, no longer need entity device, facilitate user by dummy keyboard, to carry out man-machine interactive operation whenever and wherever possible.
Embodiment
By describing technology contents of the present invention, structural attitude in detail, being realized object and effect, below in conjunction with embodiment and coordinate accompanying drawing to be explained in detail.
Refer to Fig. 1, hardware structure schematic diagram for the virtual touch-control system of man-machine interactive in embodiment of the present invention, this system 100 comprises the virtual contactor control device of man-machine interactive 10, two picture pick-up devices 20 and display devices 21, for the detection of user's gesture being realized to touch-control input.
Please refer to Fig. 2, it is the high-level schematic functional block diagram of the virtual contactor control device of man-machine interactive in embodiment of the present invention.This device 10 comprises that ambient brightness sensing unit 101, view recognition unit 102, surface level two-dimensional coordinate are set up unit 105, vertical plane two-dimensional coordinate is set up unit 106, three-dimensional coordinate computing unit 107, action judging unit 108, graphic plotting unit 109, indicative control unit 110 and display unit 111.This device 10 can be applied in electronic equipments such as camera, mobile phone, panel computer, and this picture pick-up device 20 communicates by network and this device 10 and is connected, and the transmission medium of this network can be the wireless transmission mediums such as bluetooth, zigbee, WIFI.
Each picture pick-up device 20 includes the first camera 201 and second camera 202, respectively as longitudinally picture pick-up device and laterally picture pick-up device.Wherein, as the first camera 201 of longitudinal picture pick-up device can for intelligent glasses etc. can be in user's hand top mobile portable electronic equipment, as the second camera 202 of horizontal picture pick-up device, can be positioned over the mobile portable electronic equipment in user the place ahead for intelligent bracelet etc.Further, the first camera 201 and the second camera 202 of each picture pick-up device 20 are respectively common camera and infrared camera.Wherein, common camera can, in the good situation of light condition, carry out image acquisition and be sent to device 10 and analyze user's operational motion.Infrared camera can, in the situation that light condition is poor, carries out image acquisition and be sent to device 10 and analyze user's operational motion.This view recognition unit 102 comprises longitudinal view recognin unit 103 and transverse views recognin unit 104, correspondence is as longitudinally picture pick-up device and laterally the first camera 201 and second camera 202 settings of picture pick-up device, for the image of its collection is carried out to identifying processing respectively.
When original state, two pairs of cameras (a pair of common camera and a pair of infrared camera) are used in conjunction with, and shooting direction is set to orthogonal, can catch the action behavior of hand vertical direction and horizontal direction simultaneously.Conventionally, in intelligent glasses, two cameras (a common camera and an infrared camera) are put down, and two cameras on intelligent bracelet or smart mobile phone (a common camera and an infrared camera) level is put.And, by the rectangular area of taking of two pairs of cameras, jointly form picture catching region.
The brightness value of these ambient brightness sensing unit 101 induced environments, and ambient brightness value is sent in this view recognition unit 102.This view recognition unit 102 is used common camera or infrared camera according to the luminance threshold value judgement setting in advance.For example, brightness impression scope is 1~100, and threshold value is 50, and ambient brightness value surpasses at 50 o'clock and determines and uses common camera, when ambient brightness value is used infrared camera image lower than 50 time.
According to ambient brightness value, determine after the camera types using, start initial alignment operation, specific as follows.This device 10 is when carrying out initial alignment operation, user lies against the position that two groups of selected cameras can photograph by the finger that needs operation in both hands is unsettled,, picture catching region, and keep the static of certain hour, with completing user hand position initialization flow process, be convenient to device 10 identifications and orient the initial position of pointing end points, so that follow-up operation.The principle of these device 10 identifications and location finger endpoint location will below be described in detail.
When carrying out interactive operation, user lies against in picture catching region finger is unsettled, common camera or infrared camera are used in the ambient brightness value judgement that this longitudinal view recognin unit 103 detects according to this ambient brightness sensing unit 101, and after definite camera using, the longitudinal common camera of picture pick-up device of conduct above finger or the view data of infrared camera collection are carried out to hard recognition, to determine the position of finger end points in image.Common camera or infrared camera are used in the ambient brightness value judgement that this transverse views recognin unit 104 detects according to this ambient brightness sensing unit 101, and after the camera determine using to carrying out hard recognition in finger the place ahead as the common camera of horizontal picture pick-up device or the view data of infrared camera collection, to determine the position of finger end points in image.
Wherein, the position of the definite finger end points in this longitudinal view recognin unit 103 in image is finger end points pixel at the XZ coordinate surface position in image, for example, this longitudinal recognin unit 103 identifies the capable b row of a that finger end points 1 pixel is positioned at XZ face image, end points 2 pixels are positioned at the capable d row of c of XZ face image,, end points 10 pixels are positioned at the capable f row of e of XZ face image.The position of the definite finger end points in this transverse views recognin unit 104 in image is finger end points pixel at the YZ coordinate surface position in image.For example, this transverse views recognin unit 104 identifies the capable h row of g that end points 1 pixel is positioned at YZ face image, and end points 2 pixels are positioned at the capable j row of i of YZ face image ..., end points 10 pixels are positioned at the capable l row of k of YZ face image.
Further, the method by common camera judgement finger end points comprises color background method and color glove method.Wherein, color background method is specially: the environmental background of bimanualness needs color relatively simple and single, can directly pass through so the direct handle portion Extraction of Image of color interval range of human body complexion out, then according to figure endpoint algorithm, calculate the cut off position that each strip of hand extends, as finger endpoint location.Color glove auxiliary law is specially: user wears special-purpose pure red gloves, because common camera is all RGB (red-green-blue) sampling, can directly extract pure red regional location, also can use green or blue as finger of glove end points color.
The method that judges finger central point by infrared camera comprises temperature filtering method and color glove auxiliary law.Wherein, temperature filtering method is in particular: bimanualness can be directly by the higher feature of the relative environment temperature of human surface temperature directly the higher hand Extraction of Image of temperature out, then according to figure endpoint algorithm, calculate the cut off position that hand strip extends, as each finger endpoint location.Color glove auxiliary law is specially: user wears special gloves, and there is heating effect on the surface of gloves, can directly extract the hot spot region in image like this.
This surface level two-dimensional coordinate is set up the position of finger endpoint location in image and the pixel resolution of camera that unit 105 identifies according to this longitudinal view recognin unit 103,10 finger end points location of pixels is converted to the two-dimensional coordinate value of XZ coordinate surface.This vertical plane two-dimensional coordinate is set up the position of finger endpoint location in image and the pixel resolution of camera that unit 106 identifies according to this transverse views recognin unit 104,10 finger end points location of pixels is converted to the two-dimensional coordinate value of YZ coordinate surface.
Wherein, the transfer principle that finger end points location of pixels is converted to the two-dimensional coordinate value of XZ coordinate surface is in particular: image lower left corner pixel is set to the starting point 0 of two-dimensional coordinate system, according to image analytic degree, goes out the line number of relative each image of coordinate figure scope and the ratio of columns with the coordinate figure range computation being converted to after two-dimensional coordinate.For example, the wide height of XZ coordinate surface image analytic degree is 2000*1000, the coordinate figure scope of two dimension XZ plane coordinate system is that X-axis is 1 to 150, Z axis is 1 to 100, and the column number proportion of the relative image of Z axis coordinate figure scope is 100/1000, the columns ratio 150/2000 of the relative image of X-axis coordinate figure scope.The location of pixels of finger end points is multiplied by the ratio of the relative image line of the coordinate range calculating, columns, thereby obtains being converted to the end points two-dimensional coordinate value after two-dimensional coordinate.For example, the location of pixels of certain finger end points is 300 row 200 row, and the Z axis coordinate of this finger end points is 300*100/1000=30, and the X-axis coordinate of this finger end points is 200*150/2000=15.The transfer principle of two-dimensional coordinate value that finger end points location of pixels is converted to YZ coordinate surface is the same, at this, does not add and repeats.
This three-dimensional coordinate computing unit 107 is set up unit 105 and vertical plane two-dimensional coordinate according to this surface level two-dimensional coordinate and is set up 10 finger end points location of pixels determining respectively unit 106 and calculate the coordinate figure of finger end points in XYZ three-dimensional system of coordinate in the two-dimensional coordinate value of XZ coordinate surface and YZ coordinate surface.
Wherein, the principle of work of calculating the coordinate figure of finger end points in XYZ three-dimensional system of coordinate is specially: because XZ coordinate surface and YZ coordinate surface have common Z axis, so the Z value of each coordinate end points in the Z value of each coordinate end points in XZ coordinate surface and YZ coordinate surface is extracted and is compared, consistent or the immediate coordinate end points of Z axis coordinate figure can be considered to same end points, then the coordinate figure of XZ coordinate surface and the coordinate figure of YZ coordinate surface that are judged as same end points are merged into a coordinate end points, the coordinate figure of usining as XYZ three-dimensional system of coordinate.Because Z value is likely different, so the coordinate Z value that the coordinate Z value that the Z value of the new three-dimensional coordinate producing is XZ coordinate surface adds YZ coordinate surface is then divided by 2 operation result, the X in three-dimensional system of coordinate, Y coordinate figure equal respectively X coordinate figure and the Y coordinate figure of XZ coordinate surface and YZ coordinate surface.
The band of position corresponding to each key mapping in the D coordinates value of the finger end points that this action judging unit 108 calculates according to this three-dimensional coordinate computing unit 107 and dummy keyboard, judges whether user has carried out the push of keyboard.
In the present embodiment, when hand position initial phase, this action judging unit 108 is judged plane Y-axis value according to the minimum end points of vertical direction in the D coordinates value of all finger end points (the namely min coordinates value of Y-axis) as clicking, the D coordinates value of 10 finger end points is mapped on each key area of dummy keyboard, then according to each finger end points, drop on corresponding key area and determine selected button, thereby determine key mapping information.
Owing to being hand position initial phase, this action judging unit 108 utilizes Y value to set the initial value of the judgement face of click, so the Y value of hand coordinate is all more than or equal to the decision content of the judgement face of click.And, when user moves hand and carries out the operation under normal mode of operation, each this action judging unit 108 receives after the three-dimensional coordinate of finger end points, no longer reset this click and judge plane Y-axis value, but directly according to this click, judge that plane Y-axis value judges whether that effective click action appears in virtual touch screen.
Wherein, the D coordinates value of finger end points is mapped on the key area of keyboard, be specially: in keyboard, each button can have the two-dimensional coordinate regional extent of corresponding key mapping in XZ plane, for example, button A is 7~9 formed rectangular area scopes on x axle 3~5, on Z axis at the coordinate range of XZ face, as long as there is the XZ coordinate figure of any one end points to fall into finger end points that this rectangular area scope the judges user top in key mapping A.
According to the D coordinates value judgement click action of finger end points, be specially: when having selected to click, judge after plane Y-axis value, as long as the Y value in finger end points three-dimensional coordinate is clicked and is judged plane Y-axis value lower than this, judge that this end points passes through this click judge plane, there is click behavior in this finger, then in conjunction with finger end points, which key mapping region decision user, which button carried out to clicking operation.
This graphic plotting unit 109 is according to the judged result of this action judging unit 108,, which key area 10 finger end points drop on respectively on and selected key mapping, draw out each finger of analog subscriber hand in the corresponding key mapping of corresponding dummy keyboard, then selected and occur that the button of click behavior is plotted as highlighted to represent clicked choosing.
This indicative control unit 110 is converted to the image of being drawn by this graphic plotting unit 109 sequential that display device 21 can show, call this display unit 111 operated image on dummy keyboard is shown on display device 21 for user and is watched, user can learn that according to feedback each finger is current corresponding to which key mapping and proceed virtual key operation.
Referring to Fig. 3, is the schematic flow sheet of the virtual touch control method of man-machine interactive in embodiment of the present invention, and the method comprises:
Step S30, the brightness value of these ambient brightness sensing unit 101 induced environments, common camera or infrared camera are used in the ambient brightness value judgement that the luminance threshold value that these view recognition unit 102 bases set in advance and this ambient brightness sensing unit 101 sense.
When original state, two pairs of cameras (a pair of common camera and a pair of infrared camera) are used in conjunction with, and shooting direction is set to orthogonal, can catch the action behavior of hand vertical direction and horizontal direction simultaneously.Conventionally, in intelligent glasses, two cameras (a common camera and an infrared camera) are put down, and two cameras on intelligent bracelet or smart mobile phone (a common camera and an infrared camera) level is put.And, by the rectangular area of taking of two pairs of cameras, jointly form picture catching region.
Step S31, user will need the finger of operation unsettledly lie against in picture catching region and keep the static of certain hour in both hands, by device 10 identifications with orient the initial position of finger, the initialization of completing user finger position.
The principle of these device 10 identifications and location finger position will below be described in detail.
Step S32, user will need unsettled the lying against in picture catching region of finger of operation in both hands, this longitudinal view recognin unit 103 is according to carrying out hard recognition in finger top as longitudinal common camera of picture pick-up device or the view data of infrared camera collection, to determine the position of finger end points in image.This transverse views recognin unit 104 is according to carrying out hard recognition in finger the place ahead as the view data of the common camera in horizontal picture pick-up device or infrared camera collection, to determine the position of finger end points in image.
Particularly, the position of the definite finger end points in this longitudinal view recognin unit 103 in image is finger end points pixel at the XZ coordinate surface position in image, for example, this longitudinal recognin unit 103 identifies the capable b row of a that finger end points 1 pixel is positioned at XZ face image, end points 2 pixels are positioned at the capable d row of c of XZ face image,, end points 10 pixels are positioned at the capable f row of e of XZ face image.The position of the definite finger end points in this transverse views recognin unit 104 in image is finger end points pixel at the YZ coordinate surface position in image.For example, this transverse views recognin unit 104 identifies the capable h row of g that end points 1 pixel is positioned at YZ face image, and end points 2 pixels are positioned at the capable j row of i of YZ face image ..., end points 10 pixels are positioned at the capable l row of k of YZ face image.
Further, the method by common camera judgement finger end points comprises color background method and color glove method.Wherein, color background method is specially: the environmental background of bimanualness needs color relatively simple and single, can directly pass through so the direct handle portion Extraction of Image of color interval range of human body complexion out, then according to figure endpoint algorithm, calculate the cut off position that each strip of hand extends, as finger endpoint location.Color glove auxiliary law is specially: user wears special-purpose pure red gloves, because common camera is all RGB (red-green-blue) sampling, can directly extract pure red regional location, also can use green or blue as finger of glove end points color.
The method that judges finger central point by infrared camera comprises temperature filtering method and color glove auxiliary law.Wherein, temperature filtering method is in particular: bimanualness can be directly by the higher feature of the relative environment temperature of human surface temperature directly the higher hand Extraction of Image of temperature out, then according to figure endpoint algorithm, calculate the cut off position that hand strip extends, as each finger endpoint location.Color glove auxiliary law is specially: user wears special gloves, and there is heating effect on the surface of gloves, can directly extract the hot spot region in image like this.
Step S33, this surface level two-dimensional coordinate is set up the position of finger endpoint location in image and the pixel resolution of camera that unit 105 identifies according to this longitudinal view recognin unit 103,10 finger end points location of pixels is converted to the two-dimensional coordinate value of XZ coordinate surface.This vertical plane two-dimensional coordinate is set up the position of finger endpoint location in image and the pixel resolution of camera that unit 106 identifies according to this transverse views recognin unit 104,10 finger end points location of pixels is converted to the two-dimensional coordinate value of YZ coordinate surface.
Wherein, the transfer principle that finger end points location of pixels is converted to the two-dimensional coordinate value of XZ coordinate surface is in particular: image lower left corner pixel is set to the starting point 0 of two-dimensional coordinate system, according to image analytic degree, goes out the line number of relative each image of coordinate figure scope and the ratio of columns with the coordinate figure range computation being converted to after two-dimensional coordinate.For example, the wide height of XZ coordinate surface image analytic degree is 2000*1000, the coordinate figure scope of two dimension XZ plane coordinate system is that X-axis is 1 to 150, Z axis is 1 to 100, and the column number proportion of the relative image of Z axis coordinate figure scope is 100/1000, the columns ratio 150/2000 of the relative image of X-axis coordinate figure scope.The location of pixels of finger end points is multiplied by the ratio of the relative image line of the coordinate range calculating, columns, thereby obtains being converted to the end points two-dimensional coordinate value after two-dimensional coordinate.For example, the location of pixels of certain finger end points is 300 row 200 row, and the Z axis coordinate of this finger end points is 300*100/1000=30, and the X-axis coordinate of this finger end points is 200*150/2000=15.The transfer principle of two-dimensional coordinate value that finger end points location of pixels is converted to YZ coordinate surface is the same, at this, does not add and repeats.
Step S34, this three-dimensional coordinate computing unit 107 is set up unit 105 and vertical plane two-dimensional coordinate according to this surface level two-dimensional coordinate and is set up 10 finger end points location of pixels determining respectively unit 106 and calculate the coordinate figure of finger end points in XYZ three-dimensional system of coordinate in the two-dimensional coordinate value of XZ coordinate surface and YZ coordinate surface.
Wherein, the method of calculating the coordinate figure of finger end points in XYZ three-dimensional system of coordinate is specially: because XZ coordinate surface and YZ coordinate surface have common Z axis, so the Z value of each coordinate end points in the Z value of each coordinate end points in XZ coordinate surface and YZ coordinate surface is extracted and is compared, consistent or the immediate coordinate end points of Z axis coordinate figure can be considered to same end points, then the coordinate figure of XZ coordinate surface and the coordinate figure of YZ coordinate surface that are judged as same end points are merged into a coordinate end points, the coordinate figure of usining as XYZ three-dimensional system of coordinate.Because Z value is likely different, so the coordinate Z value that the coordinate Z value that the Z value of the new three-dimensional coordinate producing is XZ coordinate surface adds YZ coordinate surface is then divided by 2 operation result, the X in three-dimensional system of coordinate, Y coordinate figure equal respectively X coordinate figure and the Y coordinate figure of XZ coordinate surface and YZ coordinate surface.
Step S35, the band of position corresponding to each key mapping in the D coordinates value of the finger end points that this action judging unit 108 calculates according to this three-dimensional coordinate computing unit 107 and dummy keyboard, judges whether user has carried out the push of keyboard.
In the present embodiment, when hand position initial phase, this action judging unit 108 is judged plane Y-axis value according to the minimum end points of vertical direction in the D coordinates value of all finger end points (the namely min coordinates value of Y-axis) as clicking, the D coordinates value of 10 finger end points is mapped on each key area of dummy keyboard, then according to each finger end points, drop on corresponding key area and determine selected button, thereby determine key mapping information.
Owing to being hand position initial phase, this action judging unit 108 utilizes Y value to set the initial value of the judgement face of click, so the Y value of hand coordinate is all more than or equal to the decision content of the judgement face of click.And, when user moves hand and carries out the operation under normal mode of operation, each this action judging unit 108 receives after the three-dimensional coordinate of finger end points, no longer reset this click and judge plane Y-axis value, but directly according to this click, judge that plane Y-axis value judges whether that effective click action appears in virtual touch screen.
Wherein, the D coordinates value of finger end points is mapped on the key area of keyboard, be in particular: in keyboard, each button can have the two-dimensional coordinate regional extent of corresponding key mapping in XZ plane, for example, button A is 7~9 formed rectangular area scopes on x axle 3~5, on Z axis at the coordinate range of XZ face, as long as there is the XZ coordinate figure of any one end points to fall into finger end points that this rectangular area scope the judges user top in key mapping A.
According to the D coordinates value judgement click action of finger end points, be specially: when having selected to click, judge after plane Y-axis value, as long as the Y value in finger end points three-dimensional coordinate is clicked and is judged plane Y-axis value lower than this, judge that this end points passes through this click judge plane, there is click behavior in this finger, then in conjunction with finger end points, which key mapping region decision user, which button carried out to clicking operation.
Step S36, this graphic plotting unit 109 is according to the judged result of this action judging unit 108,, which key area 10 finger end points drop on respectively on and selected key mapping, draw out each finger of analog subscriber hand in the corresponding key mapping of corresponding dummy keyboard, then selected and occur that the button of click behavior is plotted as highlighted to represent clicked choosing.
Step S37, this indicative control unit 110 is converted to the image of being drawn by this graphic plotting unit 109 sequential that display device 21 can show, call this display unit 111 operated image on dummy keyboard is shown on display device 21 for user and is watched, user can learn that according to feedback each finger is current corresponding to which key mapping and proceed virtual key operation.
The virtual contactor control device of a kind of man-machine interactive provided by the invention, system and method, by camera, captured position and the posture of image identification finger end points, by the finger end points coordinate obtaining, be directly mapped as the operational motion to dummy keyboard, and on display, show and feed back to user, by intelligent glasses and intelligent bracelet, or the picture pick-up device fast construction dummy keyboard input environment on intelligent and portable mobile device, no longer need entity device, facilitate user by dummy keyboard, to carry out man-machine interactive operation whenever and wherever possible.
The foregoing is only embodiments of the invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.