Software Archive
Read-only legacy content
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 討論

Transform hand gestures coordinates to mouse points

codeno47
初學者
687 檢視

How to transform hand gestures coordinates to mouse points?,  i have added some factors to convert it, it works at some extend but not perfect.

I suspect my current code will not work with different screen resolution.

  public class CursorMapping
    {
        /// <summary>
        /// The veritical mapping contant
        /// </summary>
        public const int VeriticalMappingContant = 1500;

        /// <summary>
        /// The horizontal mapping constant
        /// </summary>
        public const int HorizontalMappingConstant = 1500;
    }


 var valueY = (int)(uxEventData.position.y * CursorMapping.VeriticalMappingContant);

  var valueX = (int)(uxEventData.position.x * CursorMapping.HorizontalMappingConstant);

Is there any better way doing it, any help from Realsense SDK?

 

 

 

0 積分
1 解決方案
Avan_T
新手
687 檢視

Hi codeno47,

1. Access lib System32 (search google mouse system32)

2. Get Screen resolution with x, y

3. Create global variable store current position x,y

4. Get screen size of camera with x,y

5. Set current position = global position + (camera size/screen size)*Speed    (* condition : for best movement)

6. Update global position for store new position.

在原始文章中檢視解決方案

2 回應
Avan_T
新手
688 檢視

Hi codeno47,

1. Access lib System32 (search google mouse system32)

2. Get Screen resolution with x, y

3. Create global variable store current position x,y

4. Get screen size of camera with x,y

5. Set current position = global position + (camera size/screen size)*Speed    (* condition : for best movement)

6. Update global position for store new position.

Dagan_E_Intel
員工
687 檢視

or have a look at the TouchlessController module, that will give you what you are looking for, and more.

e.g. mouse-move events, swipe and click events, etc

回覆