LOL why nobody cam on the idea with two cameras?
It´s a normal way of thinking - you have one who is specialist for near things and one is specialist for far awary things - so combinated these two and you will have a specialist what can all!
For the X-Y Problem:
I have a script (Omron_dectect_Options, "r,f,o" - so the camera will dectect faces
Then must get Values for
if a face will recognized
i will get only values for
But funny i will get a value for "Omron_hand_CoordX" so a value for a x-coodinate for a hand.
But i not set in the options to search / recognized Hands
SO i think there is something twisted in the plugin from David
Check out yourself
Search for faces and you must get different values, but no value for Hands.
Also "Hello" to you, no Problem i am also @ work but my work is in front of a computer so i can work from time to time on robot stuff.
i got for 30 min a phone call from a Omron Salesmen, because i registred befor some weeks for Information Material about Recognition Sensors.
He told me funny story about a Tabletennis Robot also with two (2x) Cameras ;-)
The Robot is the newest Baby from them.
Oh Great ! Now Antonn will want arms !
i have study your read and write tutorial
and i must say i learn a lot from this.
I merge your script with the omron cam/script.
I let the omron check for "Name" and "Age"
ControlCommand("Omron HVC-P", Omron_Detect_Options, "r,a")
The i let your writfile script run:
$filename = "c:\meinhirn\myfile.txt"
$count = 0
$max = 100
print("Writing line " + $count + " of " + $max)
FileWriteline($filename, $Omron_Recognized_Name + "," + $Omron_age)
$count = $count + 1
if ($count = $max)
OK i let the script write an entrie every second.
This will look like this:
Now i can read the file like this ( Print only the value for age):
$filename = "c:\meinhirn\myfile.txt"
if (FileExists($filename) = false)
print("File does not exist")
$txt = FileReadLine($filename)
$schnitt = Split($txt, ",", 1)
if (FileReadEnd($filename) = true)
print("End Of File")
BUT.... now it come to interesting situations:
I have 22 entries (3 without a result or value = 0) ..... so 19 entries with a value
I add all values for the age (745) and divide with the number of entries with result (19)
745/19 = 39,210526......
So now i have the average of the age (39)
My problem is i can print the hole line but i CAN´T add the Value for Age.
The second problem is: If there is an entrie / line where is no value or a "0" i can´t count with this.
I hope you understand what i want to make.
And i hope you can help me.
There is a solution to your question. I can't give you a ready made solution right now because I don't have the time to write you script. But It's very solvable and I'll make a new tutorial specifically for your type of questions when I have time.
As a Hint if you want to try it your self in the mean time here is the basic process you need to incorporate.
You need to add a count function. So you can count your lines.
You need to read each line (which you are doing) but you need to grab the age assign it to a variable then each time you read a line, continue to add the age value to your variable Like $szAGE = $szAGE + ValueFromFile
You also want to increment the line count each time you read a line in the file like $szLineCount = $szLineCount + 1
Then at the end of your script you have to total amount of line read in $szLineCount and you have the sum of all of your ages in $szAGE.
Then you can take those and divide them with the math function in EZ-Builder to get your average age value.
For the 2 camera idea, if you want to share trained faces between the cameras, the Omron support had this to say:
>>It is possible for customer to share album data between 50 degree and 90 degree type.
But every time when customer enrolls person to HVC-P2, they have to select camera type and share album date (*I think he meant data) to another HVC-P2.
Also, if the 50 degree HVC-P2 uses album data from 90 degree HVC-P2, accuracy might decrease. <<
So that is something to be aware of for anyone want to experiment with 2 cameras.