Issue
I'm using a Raspberry Pi (4) and hoped I'd be able to implement QR detection through a Rasp Cam. I found BoofCV that could do the job - so I copied the code from the href="https://github.com/lessthanoptimal/BoofCV/blob/SNAPSHOT/examples/src/main/java/boofcv/examples/fiducial/ExampleDetectQrCode.java" rel="nofollow noreferrer">ExampleDetectQrCode repo but its throwing a few errors...
var cannot be resolved to a type
VisualizeShapes cannot be resolved
VisualizeShapes cannot be resolved
ShowImages cannot be resolved
On my imports I'm also getting:
The import boofcv.gui cannot be resolved
I used Maven to implement BoofCV, I'm very new to Maven but I think I've done it right (again just copied straight from the repo home):
<dependency>
<groupId>org.boofcv</groupId>
<artifactId>boofcv-core</artifactId>
<version>0.40.1</version>
</dependency>
Any help would be greatly appreciated, cheers
Solution
You need to import the "boofcv-swing" artifact to have the built in Swing components.
<dependency>
<groupId>org.boofcv</groupId>
<artifactId>boofcv-swing</artifactId>
<version>0.40.1</version>
</dependency>
If your application doesn't have a GUI you will want to remove anything that's in the boofcv.gui package as that will try to open a window.
Answered By - lessthanoptimal
Answer Checked By - Terry (JavaFixing Volunteer)