Ask Your Question

missing library problem?

asked 2013-01-05 14:29:24 -0500

I am currently trying to do the OpenCV face detection example in Processing, however I appear to have fallen down at the first hurdle!! I'm getting the error message ‘cannot find a class or type 'Rectangle’ in my processing window – this appears to be a file i don’t have?? (import java.awt.Rectangle;??) it's a long shot, but does anyone have any pointers?? Many thanks!

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2013-01-06 05:29:27 -0500

Mr.Mountain gravatar image

Open up the example and look at the imports. The package will describe where it is located. If it is a standard Java API class then you should copy the import into your class where you use the rectangle.

If the import has a different package, try to locate the library with this class. Copy the library into a folder. If you use Eclipse click right onto the lib and select "add to build path".

If none of this solutions worked, please give us more information. Perhaps a snippet of the example file.

edit flag offensive delete link more

answered 2013-01-06 03:31:12 -0500

There is Core.rectangle function in OpenCV Java API. Do you mean this function? You need add "import org.opencv.core;" to java file.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2013-01-05 14:29:24 -0500

Seen: 388 times

Last updated: Jan 06 '13