nav question
JW from United States  [5 posts]
13 year
im trying to show the camera an object and have it speak the name of the object but i cant seem to get it to work correctly can you show me how to define what comparison and what variable... example the camera sees a pepsi and says pepsi the camera sees a pencil and says pencil.
Anonymous 13 year

Just in case the image recognition is the issue can you include the two images you are using for templates and the test images that you were attempting? That will ensure that what we post back works in your situation or we'd be able to explain why things are not working.

In a nutshell, you should be able to use the OBJECT_NAME variable and test that using IF Statement modules that encompass a Speak module that would say the specific word. If you have labeled your images with what you want to speak you should be able to plug that OBJECT_NAME variable directly into the Speak module ... but that will cause a lot of repetitions.

See the attached robofile as an example. You'll have to add objects using your own camera.

EDV  [328 posts] 13 year
If this question was connected to AVM Navigator then see example:

TotalObj = GetVariable("NV_OBJECTS_TOTAL")
ObjIdx = GetArrayVariable("NV_ARR_OBJ_IDX")

ReDim ObjName(20)
ObjName(0) = "1"
ObjName(1) = "2"
ObjName(2) = "3"
ObjName(3) = "4"
ObjName(4) = "5"

SpeakStr = "I see"

for i = 0 to TotalObj-1 step 1
SpeakStr = SpeakStr + " " + ObjName(ObjIdx(i))

if TotalObj = 0 then SpeakStr = SpeakStr + " nothing"

SetVariable "SPEAK_STR", SpeakStr

See also attached program.robo file.
JW from United States  [5 posts] 13 year
thats really cool, thanks.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index