javamavenopenimaj

Finding the Caltech101 class and Record in OpenImaj


I am trying this tutorial http://www.openimaj.org/tutorial/classification101.html and this code is failing for me:

GroupedDataset<String, VFSListDataset<Record<FImage>>, Record<FImage>> allData = 
            Caltech101.getData(ImageUtilities.FIMAGE_READER);

The reason is that Record and Caltech101 are not recognized and can't import them. All the other classes work fine.

Here is my maven dependency:

<dependencies>
    <dependency>
        <artifactId>image-processing</artifactId>
        <groupId>org.openimaj</groupId>
        <version>1.3.1</version>
        <scope>compile</scope>
    </dependency>
</dependencies>

I also tried adding all the other dependencies from their website, http://www.openimaj.org/index.html but with no luck.

If anybody that had expirience with OpenImaj, if they could help that would be great.


Solution

  • You need to add the image-annotation Maven dependency.

    <dependency>
        <groupId>org.openimaj</groupId>
        <artifactId>image-annotation</artifactId>
        <version>1.3.1</version>
    </dependency>
    

    Note that compile scope is the default scope so you can't omit it.