/** * Create an image dataset from the flickr gallery, photoset or collection * at the given url. * * @param reader * the reader with which to load the images * @param token * the flickr api authentication token * @param url * the url of the collection/gallery/photo-set * @return a {@link FlickrImageDataset} created from the given url * @throws Exception * if an error occurs */ public static <IMAGE extends Image<?, IMAGE>> FlickrImageDataset<IMAGE> create(InputStreamObjectReader<IMAGE> reader, FlickrAPIToken token, URL url) throws Exception { return create(reader, token, url, 0); }
/** * Create an image dataset by searching flickr with the given search terms. * * @param reader * the reader with which to load the images * @param token * the flickr api authentication token * @param searchTerms * the search terms; space separated. Prepending a term with a * "-" means that the term should not appear. * @return a {@link FlickrImageDataset} created from the given url * @throws Exception * if an error occurs */ public static <IMAGE extends Image<?, IMAGE>> FlickrImageDataset<IMAGE> create(InputStreamObjectReader<IMAGE> reader, FlickrAPIToken token, String searchTerms) throws Exception { return create(reader, token, searchTerms, 0); }
/** * Create an image dataset by searching flickr with the given search terms. * * @param reader * the reader with which to load the images * @param token * the flickr api authentication token * @param searchTerms * the search terms; space separated. Prepending a term with a * "-" means that the term should not appear. * @return a {@link FlickrImageDataset} created from the given url * @throws Exception * if an error occurs */ public static <IMAGE extends Image<?, IMAGE>> FlickrImageDataset<IMAGE> create(InputStreamObjectReader<IMAGE> reader, FlickrAPIToken token, String searchTerms) throws Exception { return create(reader, token, searchTerms, 0); }
/** * Create an image dataset from the flickr gallery, photoset or collection * at the given url. * * @param reader * the reader with which to load the images * @param token * the flickr api authentication token * @param url * the url of the collection/gallery/photo-set * @return a {@link FlickrImageDataset} created from the given url * @throws Exception * if an error occurs */ public static <IMAGE extends Image<?, IMAGE>> FlickrImageDataset<IMAGE> create(InputStreamObjectReader<IMAGE> reader, FlickrAPIToken token, URL url) throws Exception { return create(reader, token, url, 0); }
final FlickrImageDataset<FImage> cats = FlickrImageDataset.create(ImageUtilities.FIMAGE_READER, flickrToken, "cat", 10); DisplayUtilities.display("Cats", cats);
final int numImages = 20; final FlickrImageDataset<MBFImage> dataset = FlickrImageDataset.create(ImageUtilities.MBFIMAGE_READER, token, "colorful", numImages);
final int numImages = 20; final FlickrImageDataset<MBFImage> dataset = FlickrImageDataset.create(ImageUtilities.MBFIMAGE_READER, token, "colorful", numImages);