Problems with examples

42 views
Skip to first unread message

Paul Nykamp

unread,
Oct 8, 2021, 12:45:17 PM10/8/21
to BoofCV
Hi,

I'm having a lot of problems running the boofcv examples, both because of runtime exceptions and compile errors. I suspect the source of the different problems may be the same so I'm going to outline one of the problems here.

I'm trying to run this ExampleConvolution code, and I'm running the code unchanged.

Here are my POM Dependancies for boofcv
<dependency>
   <groupId>org.boofcv</groupId>
   <artifactId>boofcv-core</artifactId>
   <version>0.38</version>
</dependency>
<dependency>
   <groupId>org.boofcv</groupId>
   <artifactId>boofcv-swing</artifactId>
   <version>0.38</version>
   <scope>test</scope>
</dependency>
<dependency>
   <groupId>org.boofcv</groupId>
   <artifactId>visualize</artifactId>
   <version>0.26</version>
</dependency>
Non of the imports are marked as errors so I assume I have all the jars I need.
As you can see in the image attached, there are 3 compile errors, so I can't run it. All the errors are similar.

Screen Shot 2021-10-08 at 12.19.17 PM.png

Here is the first error description:
Multiple markers at this line
- GConvolveImageOps cannot be resolved or is not a field
- The method horizontal(K, In, Out, B) in the type GConvolveImageOps is not applicable for the arguments (Kernel1D_S32, GrayU8, GrayS16, 
BorderType)
 
I have tried java 10 and 11, same results in both.

Can anybody explain why the method signatures are so different ie: GConvolveImageOps.horizontal is expecting GConvolveImageOps.horizontal(K, In, Out, B) but the example code is sending GConvolveImageOps.horizontal(Kernel1D_S32, GrayU8, GrayS16, BorderType)

Any help is appreciated, I'm a bit stuck on this one.

Thanks,
Paul

Peter

unread,
Oct 14, 2021, 5:05:34 PM10/14/21
to BoofCV
Paul,

I see two potential problems.

1) You are referencing "visualize" instead of "boofcv-swing". That was changed a long time ago. Plus all modules should be version 0.38.
2) The example code you linked to is from SNAPSHOT, which is the current working and you might need to compile the code yourself. The wiki should have the latest stable version and link to the v0.38 tag.

Not really relevant for your question, but the latest stable is now v0.39.1 and everything should work now.

There's a good chance documentation needs to be improved here. Could you tell me how you decided to use "visualize" package?

Thanks,
- Peter


Paul Nykamp

unread,
Oct 14, 2021, 8:32:07 PM10/14/21
to BoofCV

Hi Peter,

Thanks for the feedback.

Actually I didn't decide to use the visualize package, I'm just trying to run the example in the link, I din't change the code.

I'll try using v0.38 or v0.39.1, I'm assuming these are precompiled and have dependancies?

I did also try and compile the SNAPSHOT on a new install of OS X - but I ran into the problem that gradle complained about jdk 16 and 17, the only other one Oracle publishes is jdc 8. Don't really want to go back that far, and I didn't find jdk 11 either. Do you know what the current recommended version of gradle and jdk if I want to try compiling?

Thanks,
Paul

Peter A

unread,
Oct 19, 2021, 8:30:02 AM10/19/21
to boofcv
Hi Paul,

Actually I didn't decide to use the visualize package, I'm just trying to run the example in the link, I din't change the code.

I was referring to the Maven include for this artifact: <artifactId>visualize</artifactId>. Guess I should have said artifact and not package. Basically that artifact got retired and replaced by boofcv-swing.
 
I'll try using v0.38 or v0.39.1, I'm assuming these are precompiled and have dependancies?

Yep, both are you Maven Central.
 
I did also try and compile the SNAPSHOT on a new install of OS X - but I ran into the problem that gradle complained about jdk 16 and 17, the only other one Oracle publishes is jdc 8. Don't really want to go back that far, and I didn't find jdk 11 either. Do you know what the current recommended version of gradle and jdk if I want to try compiling?

The current build script "should" download a JDK with the correct version if you are building from the command line. If you're using IntelliJ, Eclipse, or some other IDE it probably doesn't recognize that setting as it's still very new. It should be built with Java 15. Could you describe how you built it? Want to see if there's a bug that needs to be fixed or not.

Cheers,
- Peter

--
"Now, now my good man, this is no time for making enemies."    — Voltaire (1694-1778), on his deathbed in response to a priest asking that he renounce Satan.

Paul Nykamp

unread,
Oct 19, 2021, 3:16:27 PM10/19/21
to BoofCV
Hi Peter,

I built the SNAPSHOT by installing JDK 16 and Gradle 7.2 on a new install of OSX using the instructions in this video (https://www.youtube.com/watch?v=qMTtdiujAtQ&t=67s). JDK 16 is one problem, Oracle doesn't currently have JDK 15 available for download.

I'm currently working on another project, but I'll get back to this in a few days. I think with the pointers you've given me I should be able to figure it out, and I'll be sure to let you know how it goes.

Thanks for the help,
Paul

Peter A

unread,
Oct 20, 2021, 8:13:45 PM10/20/21
to boofcv
You can also download the JDK from Zulu and others:


--
You received this message because you are subscribed to the Google Groups "BoofCV" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boofcv+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/boofcv/2b6e8f6b-0312-4c80-b491-7fec8eae7c53n%40googlegroups.com.

Paul Nykamp

unread,
Oct 28, 2021, 10:42:57 AM10/28/21
to BoofCV
Hi Peter,

Sorry to take so long to get back, I had a chance to give another BoofCV another try. I got farther this time thanks to your tips, but I still have a problem.

First of all, using Zulu jdk 11 instead of Oracle JDK 16 fixed the compiling problem for the SNAPSHOT. I was able to compile and go through all the examples and demonstrations. Very impressive and thank you!

Next I tried a project in Eclipse using maven. I’m trying to do something along the lines of your VisualizeLineRansac demonstration.

Im starting by using these dependencies in maven.
<dependency>
   <groupId>org.boofcv</groupId>
   <artifactId>boofcv-core</artifactId>
   <version>0.39.1</version>
</dependency>
<dependency>
   <groupId>org.boofcv</groupId>
   <artifactId>boofcv-swing</artifactId>
   <version>0.39.1</version>
   <scope>test</scope>
</dependency>

I get the error: “The import boofcv.gui cannot be resolved” on these imports.

import boofcv.gui.binary.VisualizeBinaryData;
import boofcv.gui.feature.ImageLinePanel;
import boofcv.gui.image.ShowImages;

My question is should these classes be available in either boofcv-core or boofcv-swing? Do I need to import another book-cv package?

In answer to your earlier question about why I used <artifactId>visualize</artifactId> in Maven, I remember now, It solve errors on the imports above, although it wasn’t the correct solution, obviously.

Thanks,
Paul

Paul Nykamp

unread,
Oct 28, 2021, 8:09:02 PM10/28/21
to BoofCV
Hi Peter, 

ps on my last message, I removed the scope from the boofcv-swing dependency and now the imports work correctly.

Paul

Peter A

unread,
Oct 29, 2021, 1:34:30 PM10/29/21
to boofcv
Was about to point that out. I'll see if I can make a better step by step guide for getting things up and running.

Cheers,
- Peter

Paul Nykamp

unread,
Oct 29, 2021, 3:17:16 PM10/29/21
to BoofCV

Hi Peter,

Now that I have it running, I'm loving boofcv. I'm doing time lapse videos from still images, and every once in a while there is a bad image. I'm using boofcv to find them. I have something rudimentary working  now.

The <scope> oversight was mine, should have read more closely what I was cutting and pasting :-)

Paul
Reply all
Reply to author
Forward
0 new messages