Step 2: Store Processed Images
You save your MediaObjects (the analyzed image data and its associated metadata) in one or more MediaCollections. A MediaCollection is a container or category that can be used to access a collection of MediaObjects. Searching operates on individual MediaCollections (such as a collection of animal images, undersea images, faces of people, or medical images etc.). You can extend your searches to span multiple media collections.
The Strings below represent the input path to the previously analyzed MediaObject and the output path for the new MediaCollection.
String mediaCollectionPath = new String
String analyzedImagePath = new String
Now instantiate a MediaCollection and create it on the disk.
MediaCollection myMediaCollection =
Add the MediaObject to the new MediaCollection, and close the MediaCollection.