- All Superinterfaces:
- All Known Implementing Classes:
public interface SceneRecognition<T extends ImageBase<T>> extends VerbosePrint
Implementations of this interface seek to solve the problem of "have I seen this scene before, but from the same or different perspective? If so find those images". For example, this should be used if you want to find images of a mountain taken from a different angle or zoom. Implementations may or may not apply geometric constraints to ensure that it is the same scene. Usage Example:
- Learn a model from a set of images by calling
- Add images for later retrieval by calling
query(T, boofcv.misc.BoofLambdas.Filter<java.lang.String>, int, org.ddogleg.struct.DogArray<boofcv.abst.scene.SceneRecognition.Match>)to find the set of N images which are most similar to the passed in image
Nested Class Summary
Nested Classes Modifier and Type Interface Description
static classReferences a match in the database to the query image
Modifier and Type Method Description
String id, T image)(Adds a new image to the database
()Removes all images from the database.
List<String> storage)(@NullableReturns a list of image IDs in the database
()The image data type which can be processed
Iterator<T> images)(Learns a model by finding the most distinctive features in the provided set of images.
T queryImage, BoofLambdas.Filter<String> filter, int limit, DogArray<SceneRecognition.Match> matches)(Finds the best matches in the database to the query image.
learnModelLearns a model by finding the most distinctive features in the provided set of images. Images are not added to the database.
clearDatabasevoid clearDatabase()Removes all images from the database. The model is not modified
addImageAdds a new image to the database
id- The unique ID for this image
image- The image
queryboolean query(T queryImage, @Nullable BoofLambdas.Filter<String> filter, int limit, DogArray<SceneRecognition.Match> matches)Finds the best matches in the database to the query image.
queryImage- (Input) image being processed
filter- (Input) Used to filter results so that known matches don't pollute the results.
limit- (Input) The maximum number of results it will return. If ≤ 0 then all matches are returned.
matches- (Output) Set of matches found in best first order. List is always cleared
- true if at least one valid match was found or false if no valid matches could be found. If false that means matches is empty. This is strictly a convenience.
getImageIdsReturns a list of image IDs in the database
storage- (Optional) Storage for the list of images. If null a new instance is created
- List of all the image IDs.
getImageTypeThe image data type which can be processed