Package edu.tufts.hrilab.vision
Interface VisionInterface
- All Superinterfaces:
VisionInterface
- All Known Subinterfaces:
MockVisionInterface
- All Known Implementing Classes:
MockVisionComponent
,VisionComponent
Interface for the DIARC Vision Component. This adds functionality that doesn't
exist in edu.tufts.hrilab.interfaces.VisionComponent and is only available in the "real"
VisionComponent.
-
Method Summary
Modifier and TypeMethodDescriptionGet List of all SearchManager IDs in long term memory.byte[]
Return the camera's last depth frame in a byte array.byte[]
Return the camera's last disparity frame in a byte array.byte[]
getFrame()
Return the camera's last frame in a byte array.Returns the size of the image being used.getUnsatisfiableConstraints
(Symbol descriptor) Find what part(s) of the requested descriptor vision doesn't know how to process.getUnsatisfiableConstraints
(List<? extends Symbol> descriptors) Find what part(s) of the requested descriptors vision doesn't know how to process.boolean
Use the passed in term to learn a new descriptor.makeObservations
(Term observation) Entry point in vision for making world observations.boolean
nameDescriptors
(List<? extends Symbol> descriptors, Symbol typeName) Name the collection of Predicate descriptors.void
void
void
void
startType
(long typeId) Start detecting/tracking specified SearchManager.void
void
stopType
(long typeId) Stop detecting/tracking specified SearchManager.void
takeSnapshot
(String filename) Save the current frame to file (e.g., for logging).boolean
Un-learns things that have been learned by the learn method.Methods inherited from interface edu.tufts.hrilab.interfaces.VisionInterface
addDescriptor, confirmToken, confirmToken, createNewType, endDescriptorChanges, getDescriptors, getToken, getTokenIds, getTokenIds, getTokenIds, getTokens, getTokens, getTokens, getTypeId, getTypeId, getTypeIds, nameDescriptors, removeDescriptor, stopAndRemoveType
-
Method Details
-
pauseCapture
void pauseCapture() -
resumeCapture
void resumeCapture() -
stopAllSearches
void stopAllSearches() -
restartAllStoppedSearches
void restartAllStoppedSearches() -
nameDescriptors
Name the collection of Predicate descriptors. The descriptors must belong to a single SearchManager that already exists, or an attempt to create a new SearchManager matching the descriptors will be made. The description must match the SearchManager description exactly.- Parameters:
descriptors
- Predicate description of objecttypeName
- Predicate name of object (name will be bound to typeId in VisionComponent)- Returns:
- true if descriptors map to an existing typeId, false otherwise
-
getUnsatisfiableConstraints
Find what part(s) of the requested descriptors vision doesn't know how to process.- Parameters:
descriptors
-- Returns:
- list of (possibly empty) unsatisfiable constraints
-
getUnsatisfiableConstraints
Find what part(s) of the requested descriptor vision doesn't know how to process.- Parameters:
descriptor
-- Returns:
- list of (possibly empty) unsatisfiable constraints
-
learn
Use the passed in term to learn a new descriptor. The term must have two arguments, the first arg 'describing' the new thing-to-learn, and the second arg 'naming' the new thing-to-learn. The description must be composed entirely of things vision already knows about.- Parameters:
learningTerm
- term specifying the kind of learning to do (e.g., instanceOf(X,Y), definitionOf(X,Y))bindings
- variable bindings to any variables in query term- Returns:
- if thing-to-learn was successfully learned
-
unlearn
Un-learns things that have been learned by the learn method.- Parameters:
learningTerm
-bindings
-- Returns:
-
getAvailableTypeIds
Get List of all SearchManager IDs in long term memory.- Returns:
- List of MemoryObjectType IDs
-
startType
void startType(long typeId) Start detecting/tracking specified SearchManager.- Parameters:
typeId
-
-
stopType
void stopType(long typeId) Stop detecting/tracking specified SearchManager.- Parameters:
typeId
-
-
getFrame
byte[] getFrame()Return the camera's last frame in a byte array.- Returns:
- the image in a byte array
-
getDisparityFrame
byte[] getDisparityFrame()Return the camera's last disparity frame in a byte array.- Returns:
-
getDepthFrame
byte[] getDepthFrame()Return the camera's last depth frame in a byte array.- Returns:
-
takeSnapshot
Save the current frame to file (e.g., for logging).- Parameters:
filename
-
-
getImageSize
Dimension getImageSize()Returns the size of the image being used.- Returns:
- Dimension containing the size
-
makeObservations
Entry point in vision for making world observations.- Parameters:
observation
- single term specifying observation to make- Returns:
- bindings for any free variables in observation term
-
getMyGroups
-