Closed lois-lee closed 6 years ago
I've installed OpenCV for Java on my computer and am having trouble adding the library's "external JAR" to Eclipse. I can ask my (Java) CS instructor for guidance. I was hoping to write a basic program for computing average grayscale to test the precision of the endoscope images. If we're testing this week, we may have to find another temporary method of computing this.
The OpenCV library is now working in Eclipse! I had to use a soft link for the library directory since it had hidden folders. Now looking into ways to collect and display camera feedback without involving too much third party software. Note to self: remember the links on Confluence about connecting to cameras and visual processing.
Just committed Java code for viewing the endoscope video in a computer and obtaining its camera settings. I tried to modify certain settings so that we can hold the gain and exposure constant, but so far it has been unsuccessful. Maybe it's a deficiency of the Java OpenCV library, maybe I need to use another part of it.
It seems like OpenCV can't change the camera parameters for this USB camera (perhaps because the camera is not advanced enough; it also doesn't work with my computer's built-in webcam). However, when I search "Java set camera parameters", there seems to be more documentation for doing so with the Java Android libraries. So maybe we should try figuring it out directly through app programming? Also, I wrote some code that averages the light intensity value of every pixel in the camera image. Next step is to see how sensitive it is to small spots of light against a black background (if it's not sensitive enough we could probably square/exponentiate the values).
Came across this error while running the endoscope code: Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Width (0) and height (0) must be > 0
. It seems there are two cases in which this occurs:
OpenCV: out device of bound (0-0): 1 / OpenCV: camera failed to properly initialize!
. Since I could see that my computer itself could detect the USB camera ( > About This Mac > System Report > USB), I restarted my computer and the problem was resolved (mostly, see next case).
Preliminary coding for the turbidity sensor is finished, we just need to figure out a reliable relation and then test.
Coding for the mobile application is in the works. We are using OpenCV.