Sign in to follow this  
Followers 0

Kinect Shop Window Display System

3 posts in this topic

#1 ·  Posted (edited)

Kinect Shop Window Display System

TEST DEMO MOCKUP INFORMATION EDUCATION ONLY USE AT OWN RISK

Using KinEmote and some other tools you could setup a Kinect Shop Window Display system

This way people visiting shops at night can browse the shops items

Example: Mobile phone shops, Estate Agents extra.

Note: Use at own risk, released as is not fully tested and its a MOCKUP idea for testing information only

This demo model will be changed when KinEmote release their drag and click palm version.

Some notes to take care off are lighting and distance, including how long will a Kinect device last for scanning 24h a day? Unknow?

Some thoughts are to install a Vellaman program USB interface with a proxy sensor to disable and enable the device and also offer users options to other devices maybe.

VIDEO

http://www.youtube.com/user/donnyduck1#p/u/3/16H_deqGeQY

http://www.youtube.com/user/donnyduck1#p/u/2/5xniaBkXAD4

http://www.youtube.com/user/donnyduck1#p/u/1/dafI3YkaG6M

http://www.youtube.com/user/donnyduck1#p/u/0/MlwEHe8TLJg

REQUIREMENTS:

Windows 7

C++ Estential Components Windows Updates

.Net 4 Components Windows Updates

KinEmote (http://www.kinemote.net/community/viewtopic.php?f=12&t=24) Install in seq and enter serial they provide

Stand Alone flash player - SAFlashPlayer.exe for the screensaver and copy the exe to the scrip directory

Google Chromium (Kiosk mode rocks) - http://code.google.com/p/chromium/downloads/detail?name=Chrome552.215.exe&can=2&q=

Free Flash Object - http://www.flashxml.net/basic-files/ flashxml dot net basic banner rename file for screensaver

THE SYSTEM

The system is a website so you could install IIS on your windows 7 or have it hoted on google sites or where ever

KinEmote is set as a mouse and uses the wave to activate, I hide the video feed from the users, KinEmote at this stage has single click on when you move your hand forward fast

The system detect either a clickeble are or if you keep the mouse still for a period to click and drag for X peroid of time. The new version of KinEmote will make this redundent.

Using stand alone flash player the system kicks in a screensaver using the flash banner you can download hench a advertising display when not in use. You can also open other apps on certain webpages and close them with examples like a keyboard or a app what switchs on lights extra you get the idea

The mouse circles warning is setup in Windows Control panel -> Mouse -> Pointer Options

Show mouse with CTRL button so the app sends key CRTL

You will need to get the components ready and set google chrome to point to your website hosting your project before you start. Also check the chrome path is correct else crome wont start in kiosk mode

I call this app code POW!Mouse

; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.6.1
 Author: Donald Muir = Dwalf - DonnyDuck1
 Script Function: Kinect Pow!Mouse
 Date: 02/02/2011
 Place: UK - London (Safa)

#ce ----------------------------------------------------------------------------

; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################

; ######################
; # INCLUDE AND GLOBAL #
; ######################
#include <GuiConstants.au3>
#include <Process.au3>
#include <Misc.au3>

; -----------------------------------------------------------------------

; ####################
; # RESET THE VALUES #
; ####################
$i = 0
$ii = 1
$iii = 0
$Timer  = 0
$CLICKON = 0
$GUI = 0
$Waitpos0 = 0
$Waitpos1 = 0
$WaitValue = 0
$CheckURL = 0

; -----------------------------------------------------------------------

; ##################
; # OPEN THE DLL'S #
; ##################
$dll = DllOpen("user32.dll")  ; Required DLL for ispressed

; -----------------------------------------------------------------------

; ################
; # SET HOT KEYS #
; ################
HotKeySet("q" ,"jQuit")   ; Quit this app 
HotKeySet("c","jcursor")  ; Shows what cursor number to use for detection
HotKeySet("g","jgrid")    ; Show the mouse x & y numbers for detection
HotKeySet("u","jurl")     ; Shows the currect url for detection

; -----------------------------------------------------------------------

; #######################
; # START GOOGLE CHROME # Chrome used because it does not open new windows when first clicked on in kiosk mode ;) ;)
; #######################
; If you have installed iis point Chrome to http://localhost to startup in or if you have it hosted change the url inside chrome settings
; Change the path here to your google chrome app exe in your profile c:\users\(Profilename)
Run("C:\Users\InteractiveMedia\AppData\Local\Google\Chrome\Application\chrome.exe -kiosk", "C:\Users\InteractiveMedia\AppData\Local\Google\Chrome\Application", @SW_MAXIMIZE)
; # WAIT FOR CHROME TO START BEFORE CONTINUE ELSE 5 SECOND WAIT #
WinWaitActive("[CLASS:Chrome_WidgetWin_0]", "", 5)
;;Send("{F11}") ; If you installed the wrong version of Chrome without KIOSK mode you will have to send the F11 key for fullscreen but you have risk with people comming out of full screen and able to run other apps.
;; You may want to create a scrip what will only allow certain apps to run and kill any other popups and other URLs a user may experiance or open

; -----------------------------------------------------------------------

; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################

; ####################################
; # POW!MOUSE LOOP Contantly running # You could make this app a service becuase it does not exit with demon tools
; ####################################

; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################

; ##############
; # START LOOP #
; ##############
While 1

;; #########################################
;; # DETECT A LEFT CLICK AND SHOW THE USER # Used with push single click (Needs work wont detect single click?????)  
;; #########################################
; Dont forget to set the SET MOUSE POINTER TO SHOW LOCATION WITH CTRL key in CONTROL PANNEL -> MOUSE -> POINTER OPTIONS will show the rings when the CTRL key is pressed
If _IsPressed("01", $dll) Then Send("{LCTRL}")

; ############################################
; # DETECT WHAT URL PAGE IS OPEN AND PROGRAM # Like a keyboard program extra
; ############################################
$02 = ControlGetText("[CLASS:Chrome_WidgetWin_0]", " ", WinGetTitle("[CLASS:Chrome_WidgetWin_0]"))
$url2 = ControlgetText($02, "", "Chrome_AutocompleteEditView1")
;---------------------------------------------
;;; # SHOWS THE KEYBARD APP HERE IF THE URL IS CORRECT AND THE KEYBOARD IS NOT RUNNING #
;;if $url2 = "localhost/apps/contact/index.html" then
;;If NOT ProcessExists("keyboard.exe") then Run(@ScriptDir & "\keyboard.exe", "", @SW_MAXIMIZE)
;;Else
;;; # CLOSE THE KEYBOARD APP DETECTED AND IF A DIFFRENT URL IS DETECTED #
;;If ProcessExists("keyboard.exe") Then ProcessClose("Keyboard.exe")
;;Endif
;---------------------------------------------
; # REFRESH A WEBSPACE # Some flash apps are buggy in loading so this one fixes a page by sending a F5 when you are the page
if $CheckURL = 0 then ; Only Refresh the page once else it will continue for ever without this check
if $url2 = "localhost/apps/Product/index.html" then
Send("F5") ; Send the F5 key to refresh the page
$CheckURL = 1
Else
$CheckURL = 0
Endif
Endif
;---------------------------------------------

; ####################################################
; # IF NOT A LOCAL WEBSITE THEN CLOSE AND OPEN AGAIN # This is a lock down incase the use somehow found a way out and opens a porn page on your shop display
; ####################################################
;  TO BE CODED to redirect to the correct webpage incase an app hijacks a valid webpage

; #########################################
; # WORK OUT THE DIFF IN POSITION X MOUSE # ; This is used to workout where and when to start showing the clicking rings
; #########################################
$jPos1 = MouseGetPos()
$Waitpos0 = $jPos1[0]
Sleep(1000) ; This is the speed setting of the entire system Default is 1000 = 1 seconds a loop
$jPos = MouseGetPos()
$WaitValue = ($Waitpos0 - $jPos[0])

; ###############################
; # CLICK AFTER WAIT IN SECONDS # This creates the drag and drop
; ###############################
If $GUI = 0 then
if $WaitValue > -1 and $WaitValue < 10 then  ; This is the X axis area to detect if no movement
;; ########################################
;; # DETECT WHEN THE MOUSE CURSOR CHANGES # 16 is the grab hand // NOT USED AT THIS TIME could be used for faster detection of a clickable area
;; ########################################
;;$cursor1 = MouseGetCursor()
;;If $cursor = 16 then
If $ii < 3  Then ; THIS IS HOW MANY WARNING RINGS TO DISPLAY BEFORE A CLICK AND HOLD Continues Normaly set to 3 
$ii =$ii +1
Send("{LCTRL}")
Else
; # CLICK AND HOLD WITH A DELAY # Once all the warnings are done send the click
Opt("MouseClickDownDelay",3000)  ; 3000 = 3 seconds , 1000 = 1 sec
MouseClick ("Left")                ; Send the click and reset the counters
$ii = 0
$i = 10
endif
;;endif
Else                             ; If a disruption restart the counter and do everything from scratch
$ii = 0
endif
endif

; ##############################
; # IF NO CHANGE STOP CLICKING # If the mouse has not moved from some time there is no need to continue clicking and start the timer
; ##############################
If $i = 10 Then
if $WaitValue > -1 and $WaitValue < 10 then ; This is the X axis area to detect if no movement
$GUI = 2
$Timer = $Timer +1
else                       ; If the mouse moves again reset the counters and this will cause any screensaver to exit also
$GUI = 0
$i = 0
$Timer = 0
Endif
Endif

; #############################################
; # CALL THE SCREEN SAVER IF NOTHING GOING ON #    This call the screen saver program if a long period of no activity
; #############################################
; The screen saver app uses a flash banner app and can show adverts extra while the system is not in use
if $Timer > 1000 Then
call("jScreen") ; Start The Screen Saver
Else
call("jXScreen") ; Stop The Screen Saver
EndIf

; ##################
; # ERROR CHECKING # 
; ##################
; HERE WE NEED TO CHECK IF EVERYTHING IS STILL WORKING and THEN CALL A FUNCTION

; ########
; # LOOP #
; ########
WEnd

; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################

; ##################
; # CALL FUNCTIONS #
; ##################

; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################

; -----------------------------------------------------------------------

; #########################
; # START THE SCREENSAVER #
; #########################
Func jScreen()
If ProcessExists("SAFlashPlayer.exe") Then
; Do Nothing
Else
$String = @ScriptDir & "\SAFlashPlayer.exe" & @ScriptDir & "\saver.swf" ; Open the screen saver
Run(@ComSpec & " /c " & $String, "", @SW_HIDE)
WinWaitActive("Macromedia Flash Player 8", "", 5) ; wait for the app to open before doing anything else continue in 5 seconds
Send("^f")  ; Make the app full screen
EndIf
EndFunc

; -----------------------------------------------------------------------

; #######################
; # END THE SCREENSAVER #
; #######################
Func jXScreen()
If ProcessExists("SAFlashPlayer.exe") Then
ProcessClose("SAFlashPlayer.exe")
$PIDX = ProcessExists("SAFlashPlayer.exe")
If $PIDX Then ProcessClose($PIDX)
Endif
EndFunc

; -----------------------------------------------------------------------

; ##########################
; # GET THE MOUSE POSITION #
; ##########################
Func jgrid()
; ##############
; # START LOOP #
; ##############
While 2
$jPosNo = MouseGetPos()
ToolTip("X=" & $jPosNo[0] & "       Y="& $jPosNo[1], 0, 0)
; #########
; #  LOOP #
; #########
WEnd
EndFunc

; -----------------------------------------------------------------------

; ########################
; # GET THE MOUSE Cursor #
; ########################
Func jcursor()
; ##############
; # START LOOP #
; ##############
While 3
$cursor = MouseGetCursor()
ToolTip("Cursor=" & $cursor, 0, 0)
; #########
; #  LOOP #
; #########
WEnd
EndFunc

; -----------------------------------------------------------------------

; #######################
; # GET THE URL ADDRESS #
; #######################
Func jurl()
; ##############
; # START LOOP #
; ##############
While 3
$01 = ControlGetText("[CLASS:Chrome_WidgetWin_0]", " ", WinGetTitle("[CLASS:Chrome_WidgetWin_0]"))
$url1 = ControlgetText($01, "", "Chrome_AutocompleteEditView1")
ToolTip("Cursor=" & $url1, 0, 0)
; #########
; #  LOOP #
; #########
WEnd
EndFunc

; -----------------------------------------------------------------------

; #################
; # EXIT ON Z KEY #
; #################
Func jQuit()
; ######################
; # CLOSE THE OPEN DLL #
; ######################
DllClose($dll)
; ##################
; # CLOSE THE APPS #
; ##################
ProcessClose("SAFlashPlayer.exe")
$PID = ProcessExists("SAFlashPlayer.exe")
If $PID Then ProcessClose($PID)
ProcessClose("chrome.exe")
$PID = ProcessExists("chrome.exe")
If $PID Then ProcessClose($PID)
;;ProcessClose("Keyboard.exe")
;;$PID = ProcessExists("Keyboard.exe")
;;If $PID Then ProcessClose($PID)
Exit
EndFunc

; -----------------------------------------------------------------------

; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################
; #############################################################################################

Have fun and good luck

And if you happy dont forget to add a little dwalf to your project :)

Sorry no more support offered to this code, make it your own, mod it have fun with it.

Also mirrored on KinEmote

Pow!Mouse.au3

Edited by dwalf

Share this post


Link to post
Share on other sites



#2 ·  Posted

Found some errors

C:\tmp\AutoIt\Pow!Mouse\Pow!Mouse.au3(148,29) : WARNING: $PosValueX1: possibly used before declaration.

if $WaitValue > $PosValueX1 and

~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\tmp\AutoIt\Pow!Mouse\Pow!Mouse.au3(148,58) : WARNING: $PosValueX2: possibly used before declaration.

if $WaitValue > $PosValueX1 and $WaitValue < $PosValueX2 then

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\tmp\AutoIt\Pow!Mouse\Pow!Mouse.au3(160,17) : ERROR: syntax error

MouseClick (Left)

~~~~~~~~~~~~~~~~^

C:\tmp\AutoIt\Pow!Mouse\Pow!Mouse.au3(229,45) : ERROR: syntax error

$String = @ScriptDir & "\SAFlashPlayer.exe" @ScriptDir

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\tmp\AutoIt\Pow!Mouse\Pow!Mouse.au3(148,29) : ERROR: $PosValueX1: undeclared global variable.

if $WaitValue > $PosValueX1 and

~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\tmp\AutoIt\Pow!Mouse\Pow!Mouse.au3 - 3 error(s), 2 warning(s)

!>13:48:20 AU3Check ended.rc:2

>Exit code: 0 Time: 9.853

Share this post


Link to post
Share on other sites

#3 ·  Posted

Found some errors

C:\tmp\AutoIt\Pow!Mouse\Pow!Mouse.au3(148,29) : WARNING: $PosValueX1: possibly used before declaration.

if $WaitValue > $PosValueX1 and

~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\tmp\AutoIt\Pow!Mouse\Pow!Mouse.au3(148,58) : WARNING: $PosValueX2: possibly used before declaration.

if $WaitValue > $PosValueX1 and $WaitValue < $PosValueX2 then

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\tmp\AutoIt\Pow!Mouse\Pow!Mouse.au3(160,17) : ERROR: syntax error

MouseClick (Left)

~~~~~~~~~~~~~~~~^

C:\tmp\AutoIt\Pow!Mouse\Pow!Mouse.au3(229,45) : ERROR: syntax error

$String = @ScriptDir & "\SAFlashPlayer.exe" @ScriptDir

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\tmp\AutoIt\Pow!Mouse\Pow!Mouse.au3(148,29) : ERROR: $PosValueX1: undeclared global variable.

if $WaitValue > $PosValueX1 and

~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\tmp\AutoIt\Pow!Mouse\Pow!Mouse.au3 - 3 error(s), 2 warning(s)

!>13:48:20 AU3Check ended.rc:2

>Exit code: 0 Time: 9.853

All fixed now, sorry I was in East Europe on holiday and had to rush out a modified lite version with limited internet :)

Plus I had way too much shots ;)

The old version worked of an INI file

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0