ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

#225  

Hello Justin,

no not in this project! This project is finish and check the age!

I checked where i saved this time project and i find out that it was not saved.

So i make it again and also a bit easier!

the Script starts with:

"omron Boris spy":



$last_reco_time = $date
$Omron_Recognized_Name = "0"

ControlCommand("Script Manager", ScriptStart, "spy_script")

:loop

ControlCommand("Omron HVC-P2", Omron_Detect_Options, "f,r,")


goto(loop)



"spy_script":


:startspy

if ($Omron_Recognized_Name = "Boris10")

goto(check)

endif 

goto(startspy)


:check

#the difference of $last_reco_time and $date must be in minutes

if $last_reco_time - $date < 60

$last_reco_time = $date

goto(startspy)


elseif 

$last_reco_time - $date > 60

say("you went away for 60 minutes")

$last_reco_time = $date

goto(startspy)


elseif 

$last_reco_time - $date > 120

say("you went away for 120 minutes")

$last_reco_time = $date

goto(startspy)


elseif 

$last_reco_time - $date > 600

say("you slept 10 hours")

$last_reco_time = $date

goto(startspy)

endif


So i hope this explains more what has this to do with the Omron CAM.

Boris

PS: @mickey

Jau icke komme aus Berlin! (i living in Berlin)

I was last time in Lübeck - maybe next week for one day to Hamburg..... tja Bremen ... long time ago

#226  

Hi Justin, Next time you talk to the Omron rep. Can you ask him if there is a way to not have backgrounds effect the facial recognition? I am finding the recognition doesn't work away from the origional location of the recording. Do I need to fill the frame with only the face and eliminate as much of the background as possible?

Thanks,

Ron

#227  

Hi Andy,

yes you are right!

I also found out to have better different backgrounds to have better recognition.

But i must say i had a album with long hair and after some month i had shorter hair and the recognition works really good. Or i play with my Hand with my Hair and still the Recognition works good!

But I will ask about this. And meanwhile i will produce a album with only white backgrounds and i will check out if this is better then normal pictures.

Boris

#228  

Hi Andy again,

But if you look to the pictures in the saved album, you will see that the CAM will save the Face as big as possible. So the Background is everytime so small/less then possible.

But a test with a white background will be interesting.

Boris

#229  

@Boris,

First you are missing ( and ) around your IF and ELSEIF argument statements, I don't know if that happened in your copy and paste of code or not.

Next issue is your are not understanding or you are forgetting how $date is used in ARC because it is a "String". Strings are a type of variable that can contain words or anything but you can't perform math against a string variable. Look at your $date and $last_reco_time in your variable watcher and you'll see they are cast as STRING as the type.

This means when you attempt to tell ARC or the computer to perform "$last_reco_time - $date > 120" you could just as well try telling the computer to perform "Apple - Michael Jackson > 120" - clearly it makes no sense.

But there are other options avaliable. Look at ARC Script Help and you'll find these: $date $month $year $day $dayName $hour $minute $second $monthName $time

Try this code and see what gets returned in a Variable Watcher and look at the Type of Variable. This will help you see which of these options will be helpful and which will not (Hint, look for the variables types that are Number Type because you can perform math on those.).


$TestDate = $date
$TestMonth = $month
$TestYear = $year
$TestDay = $day
$TestDayName = $dayName
$TestHour = $hour
$TestMinute = $minute
$TestSecond = $second
$TestMonthName = $monthName
$TestTime = $time

Your final problem is your ElseIF logic usage. Take a look again at how you applied it because your robot would always say you were away for 60 minutes and it would never jump down to the other conditions.

#230  

Hi Boris,

Thanks for the info. Let me know how the white background works out.

Ron

#231  

Hi Andy,

i will do that!

Hi Justin,

I know that i can´t make "$date - $last_reco_date"

There is FmtDate and FmtTimeSpan but there i got a problem that my result is not in minutes.

So my question was: Which calculation gives me as a result the differences between two dates in minutes.

Thats not so easy to have only a "Einstein - Formula" and it works.

But thats why i am asking!

Boris

#232  

@Boris, it doesn't sound like you are taking the initiative to do the work, I gave you the variables that you CAN use and a script experiment so you can see what the options do and the types in ARC so you can understand how to use them properly.

You can't take the $date variable string with the time/date stamp in there, but you can use the individual variables: $month $year $day $hour $minute

$second is even optional if you need it for something.

Your first script becomes:


$last_reco_time_month = $month
$last_reco_time_year = $year
$last_reco_time_day = $day
$last_reco_time_hour = $hour
$last_reco_time_minute = $minute

$Omron_Recognized_Name = "0"

ControlCommand("Script Manager", ScriptStart, "spy_script")
:loop
ControlCommand("Omron HVC-P2", Omron_Detect_Options, "f,r,")
goto(loop)