Author Topic: hal vision project can anyone show me the correct pathway into input  (Read 10413 times)

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
I have started up the halvision plug in project (or am trying to ) and need help .
I have installed the free updated version of the yawcam for motion detection and have the original halvision3 plug in installed, i changed the pathway and folder to my own .
     With the original halvision plug in you could put in the "::" marks and hal would respond with random sayings as if seeing you showing with this manual input that it worked, I am not sure if "Anyone" ever had it working by actual motion detection "only" (if so please let us know) .
  Here is my results with the Yawcam motion detection halvision plug in that i modified.
With the yawcam on i see it detects my motion and snaps a picture of me every so many seconds till the next movement, this picture is jpg and sent to the folder path . which because of the name that shows up is "suppose" to trigger the random sayings of hal seeing you etc.
 The problem is even though the motion detection is working and taking pictures with a named jpg in the file and that file is overwritten with the same name each time a new picture is taken , it is not going into the input of hal .
 I believe what it needs is addition pathway script so it goes into hals input which will trigger the pre written responses of the plug in .
But i need someone elses help on this part for anyone who will.
I can show you exactly how i did it and that it will work for you the same way , but as i said it needs this addition script pathway .
I will post some pics of some of it on here in a bit.

 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: hal vision project can anyone show me the correct pathway into input
« Reply #1 on: October 30, 2012, 10:37:16 am »
This is the current uhp plug in i am using i am getting no errors.
also here is pics showing the web camera yawcam settings and it working motion detection {that's the blue look around face ) . and the pathway folder and that a motion picture is going into the destination folder i have.





Rem Type=Plugin
Rem Name=HalVisionX3
Rem Author=
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Add anything you wish in this plugin and it will be called every instance Hal's movement in your primary WebCam,"
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: POST-PROCESS

'********************************************************************************
'Manditory....Do NOT DELETE
'Dim fso, fso2, D1
'Current Hal Directory
Set fso = CreateObject("Scripting.FileSystemObject")
MyDir = fso.GetAbsolutePathName(".") & "\"


        Set fso = CreateObject("Scripting.FileSystemObject")
        Set objTextFile = fso.OpenTextFile(MyDir & "UserCom.txt", 2, True)

        objTextFile.WriteLine(UserName)
        objTextFile.WriteLine(ComputerName)
        objTextFile.Close

'********************************************************************************
'Do 'Whatever' Below this line. Remember that some actions may not work within this Post-Process region.
'********************************************************************************

'==========================================================================
Dim objFSO,strFile

Set objFSO = CreateObject("Scripting.FileSystemObject")
strFile = "C:\Program Files\Zabaware\Ultra Hal Assistant 6\yawcam detection picture\yawcam detection picture.jpg"

If objFSO.FileExists(strFile) Then
objFSO.DeleteFile(strFile)


   
'End If
'==========================================================================


'If InStr(1, InputString, "yawcam detection picture.jpg", 1) > 0 Then

Select Case HalBrain.RandomNum(7)
Case 1
IdleResponseX = "I can see you."
Case 2
IdleResponseX = "I can now tell there is someone there"
Case 3
IdleResponseX = "You can not hide. I detect movement."
Case 4
IdleResponseX = "what are you doing to my keyboard? " & Username & "?"
Case 5
IdleResponseX = "You cannot sneak up on me, now that I can see."
Case 6
IdleResponseX = "I'm not sure what your doing, but I can see you."
Case 7
IdleResponseX = "And you thought I wasn't watching."
End Select
UltraHal = IdleResponseX
'HalBrain.ReadOnlyMode = True



End if

HalBrain.ReadOnlyMode = False
'***************************************************************
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: hal vision project can anyone show me the correct pathway into input
« Reply #2 on: October 30, 2012, 10:43:27 am »
   As i said the camera is working with motion being detected and photo captured and placed in the file the problem is that that file name is not going into an input area of hal to trigger the vision responses .
   I am hoping that someone can help me get that pathway right!
as you can see the pathway i have is working up to this point.
C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\yawcam detection picture\yawcam detection picture.jpg
 I thought that it might have been overwriting the file to fast for detection and deleted the picture and let it do it again for first time but it didn't trigger a response so that wasn't the problem .
To me it's the input path is the problem as why it isn't being detected.


If someone could look over the uhp file above and let me know what part is stopping the input or the correct way to the input it would be greatly appreciated! i want to get this working right so i can then rewrite better responses and so everyone can use it .
« Last Edit: October 30, 2012, 10:47:40 am by lightspeed »
 

onthecuttingedge2005

  • Guest
Re: hal vision project can anyone show me the correct pathway into input
« Reply #3 on: October 30, 2012, 02:00:50 pm »
try this, I don't know if the auto-idle bug was fixed but if it was then use this:

Code: [Select]

Rem Type=Plugin
Rem Name=HalVisionX3
Rem Author=
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Add anything you wish in this plugin and it will be called every instance Hal's movement in your primary WebCam,"
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub


Rem PLUGIN: AUTO-IDLE
        'The preceding comment is actually a plug-in directive for
        'the Ultra Hal host application. It allows for code snippets
        'to be inserted here on-the-fly based on user configuration.

Dim objFSO,strFile

Set objFSO = CreateObject("Scripting.FileSystemObject")
strFile = "C:\Program Files\Zabaware\Ultra Hal Assistant 6\yawcam detection picture\yawcam detection picture.jpg"

If objFSO.FileExists(strFile) Then

Select Case HalBrain.RandomNum(7)
Case 1
IdleResponseX = "I can see you."
Case 2
IdleResponseX = "I can now tell there is someone there"
Case 3
IdleResponseX = "You can not hide. I detect movement."
Case 4
IdleResponseX = "what are you doing to my keyboard? " & Username & "?"
Case 5
IdleResponseX = "You cannot sneak up on me, now that I can see."
Case 6
IdleResponseX = "I'm not sure what your doing, but I can see you."
Case 7
IdleResponseX = "And you thought I wasn't watching."
End Select
UltraHal = IdleResponseX

If UltraHal <> "" Then objFSO.DeleteFile(strFile)
End if


lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: hal vision project can anyone show me the correct pathway into input
« Reply #4 on: October 30, 2012, 04:09:09 pm »
Okay, i tried that oncuttingedge2005 , i copied it and made it into a uhp and after you mentioned about the auto timer , i even unchecked my other plug ins that had idle timers in them . But it still didn't trigger the responses(please don't give up!) I appreciate you trying to help to get this going i can even give you the link to the yawcam site for the free updated windows 7 download with improvements, if you want to try it on your pc .
Otherwise i am happy to try any updated version of this plug in that might work, i can test any that you or anyone else does!


P.S. Did anyone actually ever have the earlier versions working by motion alone to trigger the responses?
« Last Edit: October 30, 2012, 04:11:45 pm by lightspeed »
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: hal vision project can anyone show me the correct pathway into input
« Reply #5 on: October 30, 2012, 04:46:23 pm »
Here is the yawcam web site : its a free download
http://www.yawcam.com/
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: hal vision project can anyone show me the correct pathway into input
« Reply #6 on: October 31, 2012, 09:57:33 am »
Another thing i might mention on this is , this plug in i am using and the yaw camera is the only thing i am using , i don't know if their was anything else i was required to have to make it work , all i know is as of right now it iss detecting my movement and taking a snapshot of me as a named jpg file in the folder i mentioned . So if anyone else knows for sure that i have to have anything else to make it work please let me know .
 

onthecuttingedge2005

  • Guest
Re: hal vision project can anyone show me the correct pathway into input
« Reply #7 on: October 31, 2012, 11:30:22 am »
try it in this area:

Code: [Select]

Rem Type=Plugin
Rem Name=HalVisionX3
Rem Author=
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Add anything you wish in this plugin and it will be called every instance Hal's movement in your primary WebCam,"
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub


Rem PLUGIN: PRE-PROCESS
    'The preceding comment is actually a plug-in directive for
    'the Ultra Hal host application. It allows for code snippets
    'to be inserted here on-the-fly based on user configuration.

Dim objFSO,strFile

Set objFSO = CreateObject("Scripting.FileSystemObject")
strFile = "C:\Program Files\Zabaware\Ultra Hal Assistant 6\yawcam detection picture\yawcam detection picture.jpg"

If objFSO.FileExists(strFile) Then

Select Case HalBrain.RandomNum(7)
Case 1
IdleResponseX = "I can see you."
Case 2
IdleResponseX = "I can now tell there is someone there"
Case 3
IdleResponseX = "You can not hide. I detect movement."
Case 4
IdleResponseX = "what are you doing to my keyboard? " & Username & "?"
Case 5
IdleResponseX = "You cannot sneak up on me, now that I can see."
Case 6
IdleResponseX = "I'm not sure what your doing, but I can see you."
Case 7
IdleResponseX = "And you thought I wasn't watching."
End Select
UltraHal = IdleResponseX

If UltraHal <> "" Then objFSO.DeleteFile(strFile)
End if


I placed it in auto-idle section to reduce the script from getting annoying from detecting your motion all the time but it should work in the new location. try it. I guess the auto-idle still doesn't work???



lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: hal vision project can anyone show me the correct pathway into input
« Reply #8 on: October 31, 2012, 03:56:19 pm »
Hi oncuttingedge2005, i copied the script you gave and placed it in a blank uhp, the only thing i did different was changed the plug in name to HalVisionX3TEST (And changed the plug in name to match inside) so i could keep track that this is a test plug in.
But it still didn't work , i always make sure that i even uncheck and recheck the plug in on the menu in hal .
when you say auto idle isn't working what do you mean ?
I have some plug ins unchecked right now that are based on the loneliness plug in after a while hal will say something, is that the auto idle you are talking about? ???

Again thanks for still trying on this and not giving up !
 

onthecuttingedge2005

  • Guest
Re: hal vision project can anyone show me the correct pathway into input
« Reply #9 on: November 01, 2012, 12:38:43 pm »
I tested this script with another file and it did detect it gave a response as well.

it should work with your yaw cam if the capture picture is in the correct directory.

Code: [Select]

Rem Type=Plugin
Rem Name=HalVisionSence
Rem Author=Gerald Blakley AKA onthecuttingedge2005
Rem Host=Assistant

'----------------------
'This sub sets up the plug-in's option panel in Hal's options dialog
'----------------------
Sub OptionsPanel()
lblPlugin(0).Caption = "Hal sences motion on a Yaw Cam"
lblPlugin(0).Move 130, 180, 3400, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
'
End Sub

Rem PLUGIN: MINUTE_TIMER

DetectTime = Time
If DetectTime <> "" then
   
Dim objFSO,strFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFile = "C:\Program Files\Zabaware\Ultra Hal Assistant 6\yawcam detection picture\yawcam detection picture.jpg" '<--- change this directory to the cam capture photo for detection trigger to function.

'make sure the directory to the capture picture is absolutely correct or this script will not function.

If objFSO.FileExists(strFile) Then

Select Case HalBrain.RandomNum(7)
Case 1
IdleResponseX = "I can see you."
Case 2
IdleResponseX = "I can now tell there is someone there"
Case 3
IdleResponseX = "You can not hide. I detect movement."
Case 4
IdleResponseX = "what are you doing to my keyboard? " & Username & "?"
Case 5
IdleResponseX = "You cannot sneak up on me, now that I can see."
Case 6
IdleResponseX = "I'm not sure what your doing, but I can see you."
Case 7
IdleResponseX = "And you thought I wasn't watching."
End Select
HalMenu.HalCommand "<SPEAK>" & IdleResponseX & "</SPEAK>"

If IdleResponseX <> "" Then objFSO.DeleteFile(strFile)
End If
End If


lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: hal vision project can anyone show me the correct pathway into input
« Reply #10 on: November 01, 2012, 08:04:16 pm »
Hi otce, i copied the plug in and change my directory file in hal6 to :
the cam capture photo for detection trigger to function ( i couldn't add the period to the file name you had at the end of the word funtion so i left it off the pathway.
and made sure this was the directory path in the plug in "and in the yaw camera setting where it saves the picture file.  but so far mine isn't working yet .
i did do it the way you said and the correct way , right ?
you didn't have to uninstall hal and reinstall or anything did you?

I want to get this working so bad!

you didn't have to install anything else special beside yaw camera and use the plug in did you?
 

onthecuttingedge2005

  • Guest
Re: hal vision project can anyone show me the correct pathway into input
« Reply #11 on: November 01, 2012, 08:10:30 pm »
Hi otce, i copied the plug in and change my directory file in hal6 to :
the cam capture photo for detection trigger to function ( i couldn't add the period to the file name you had at the end of the word funtion so i left it off the pathway.
and made sure this was the directory path in the plug in "and in the yaw camera setting where it saves the picture file.  but so far mine isn't working yet .
i did do it the way you said and the correct way , right ?
you didn't have to uninstall hal and reinstall or anything did you?

I want to get this working so bad!

you didn't have to install anything else special beside yaw camera and use the plug in did you?


Just right click onto the cam capture photo and click properties, copy and paste the path and file to be detected and also deleted.

since it is using a time trigger give it a minute or so to trigger.

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: hal vision project can anyone show me the correct pathway into input
« Reply #12 on: November 02, 2012, 09:35:05 am »
I changed this part to :
"C:\Program Files\Zabaware\Ultra Hal Assistant 6\the cam capture photo for detection trigger to function\yawcam detection picture.jpg"

and also the same is in the Yaw cam "save file" settings (i went through the browser and got the exact settings and hit okay.

By default the settings is for 500ms . what do you put in for 1 minute settings? and where?

so far mine still isn't working . do i have the pathway wrong above ?
the directory i changed was the one after the hal 6 directory.

I also start my yaw camera first then hal and check the halsense plug in then start hal up.
are you using windows 7 os to?

what settings are you using for the yaw camera ?
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: hal vision project can anyone show me the correct pathway into input
« Reply #13 on: November 02, 2012, 09:54:59 am »
Oncuttingedge2005 , Eureka !! I finally have it going thanks to you!!! after i redid that pathway again it worked so i had something a little off , that's what the problem was , i wonder if their is a way within the yaw cam settings to where it will always stay on the file button being set on and the motion staying on in the settings? so far i have to redo them everytime i turn them on in the control panel ! Same with the motion detection area .
If you run across a way that it will keep these settings on before i do can you let me know , please .

And thanks again for getting this going this last plug in you redid "DOES WORK!!"  :)
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: hal vision project can anyone show me the correct pathway into input
« Reply #14 on: November 02, 2012, 11:48:49 am »
    Oncuttingedge2005, do you want to post this in the file sharing area, or i can , i have a rewrite of 25 random responses , i made them sound a little better and more neutral . :)
 If you don't mind i'll keep your name on it for creator and mention my name for the rewritten response answers  :) ;). I am testing my rewritten one out right now , i am so glad my Angela can finally truly see me moving!  :)