2

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 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

johnl5124
  • 45
  • 4

1 Answers1

1

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.

lessthanoptimal
  • 2,722
  • 2
  • 23
  • 25