Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using procamcalib with CCDbcamera #4

Closed
DanLighter opened this issue Apr 19, 2016 · 24 comments
Closed

Using procamcalib with CCDbcamera #4

DanLighter opened this issue Apr 19, 2016 · 24 comments

Comments

@DanLighter
Copy link

Hi Samuel,

Firstly, thank you for developing this awesome piece of software!

I am basically using it to calibrate the positions of cameras and projectors for a surface capture imaging system. This consists of 1 webcam, 1 projector and 1 CCD camera.

I have managed to get the calibration procedure to work when using just the webcam and projector straight through OpenCV setting. I am now trying to add the additional CCD camera simultaneously.

I have downloaded and compiled the libdc1394 library and when I run it I can get the camera to capture frames.

However what settings would I need to point the procamcalib software in the direction of the CCD camera please? When I run at the moment I get the following error. ps. I am not very familiar with Java.

error

These are the settings I currently have (basically default) for the ProCamCalib software.

settings for sam

Many thanks in advance for your help!

Dan

@saudet
Copy link
Member

saudet commented Apr 19, 2016

You've compiled libdc1394 for Windows and you've confirmed that it works for your camera?

@saudet
Copy link
Member

saudet commented Apr 19, 2016

I see you did. So, we would need to generate JNI bindings for that now... Could you try to follow the instructions on the following page?
https://github.com/bytedeco/javacpp-presets/#build-instructions
Or at least could you tell me how you got libdc1394 to work on Windows, and I'll add it to the cppbuild.sh script? Thanks!

@DanLighter
Copy link
Author

Hi sam, thanks for the quick response. I compiled libdc1394 using MinGW to create an exe file which can run the camera. So I have all the cpp files available in the environment path. I will try following those build instructions and let you know how i get on! Thanks

@saudet
Copy link
Member

saudet commented Apr 20, 2016

You didn't need to specify any special configure flags? It just worked?

@DanLighter
Copy link
Author

The only thing I changed from default settings in the cpp code was the image resolution to 1024 x 1024. When I compiled it, it recognized the camera from the IEEE1394 port.

@saudet
Copy link
Member

saudet commented Apr 21, 2016

It requires the CMU 1394 Camera Driver to be installed though:

checking for GetCmdrVersion in -l1394camera... no
configure: error: lib1394camera not found or too old. Please upgrade to 6.4.5 or a more recent version.

And we might want to install libusb as well:
pacman -S mingw-w64-x86_64-libusb mingw-w64-i686-libusb

I can easily produce an EXE with that, but not a DLL like we need for Java. Do you know how to make it create a DLL?

saudet added a commit to bytedeco/javacpp-presets that referenced this issue Apr 21, 2016
@saudet
Copy link
Member

saudet commented Apr 21, 2016

Oh, I think I got something working. Get the latest commit above and try a mvn clean install on that!

@DanLighter
Copy link
Author

Yes sorry I forgot to mention I installed the CMU driver and changed the driver on the camera to the CMU one.
Ok looks great. I am away from work for the next 9 days on a conference, but I will try the above when I am back on my uni computer with the CCD. Thanks for the help!

@DanLighter
Copy link
Author

hi samuel, I have been back and having a play with this again this week. we have been trying desperately to get it to compile but had a lot of issues along the way

am i right in saying that I first need to build javacpp in maven and javacpp presets then once that is in the repository run install on the libdc1394 build?
is it possible to simply compile the libdc1394 in maven and the copy over the jar files into the existing folder. at the moment i am just running
mvn install --projects .,libdc1394

or will i need to compile all the different plugins by building and running mvn clean install on all of these files after downloading them all?

would it also be possible to get a copy of the compiled jar file that worked for you please so i can test it in the software to see if it will be compatible with my CMU?
thanks for your help in advance

@saudet
Copy link
Member

saudet commented May 13, 2016

You could build libdc1394 only yes, but you would need to backport the changes to JavaCPP 1.1.

Anyway, we should be making a new release by next week, so you could also wait a bit.

@saudet
Copy link
Member

saudet commented May 16, 2016

I've released version 1.2, which should work out of the box with libdc1394 on Windows.

Thanks for reporting this!

@saudet saudet closed this as completed May 16, 2016
@DanLighter
Copy link
Author

Hi Samuel,

Thanks for the update. I have been playing with it this morning. At the moment I am having difficulty with the new 1.2 version. It crashes on my system the moment I do anything ie. try to load in previous calibration pcc settiongs. I get the following error

java platform se binary has stopped working

And then it closes. However version 1.1 seems to work so I wouldn't think it is an issue with my java platform but I could be wrong. I have the most up to date version. I have also tried it on multiple computers and I get the same issue.

Thanks for your help again,

@saudet
Copy link
Member

saudet commented May 16, 2016

Well, it works here (Windows 10), so I will not be able to debug something that works fine.

If you could try to build from source and figure out what makes it work on your system, that would help.

@DanLighter
Copy link
Author

Ok I will have another go at the build again and let you know how I get on

@saudet
Copy link
Member

saudet commented May 16, 2016

@saudet
Copy link
Member

saudet commented May 17, 2016

You know, I don't have a camera to test libdc1394 at the moment, so there are good chances this is related to the new libdc1394 module for Windows. If you remove the libdc1394*jar files from the modules directory, does it still crash? If not, then we could limit our investigation to that module...

@DanLighter
Copy link
Author

yep we did have a go at just removing those files, but it still crashed. the good news is before it crashes when i have the camera plugged in it recognises it. do you know of a way i could debug or get a problem signature when running the module to give you a bit more info? I tried running the file through command line but got no information back on why it crashed.

i am just trying the build again from source and getting further than before

@saudet
Copy link
Member

saudet commented May 17, 2016

When the JVM crashes, it usually creates a log file with a name like hs_err_pidxxxx.log either in the current directory or in a temporary directory somewhere. That should contain useful information.

@DanLighter
Copy link
Author

Ok I think i have found the Java error. Does this mean anything useful? (sorry for the lack of knowledge, i am not a computer science student)
hs_err_pid5852.txt

@saudet
Copy link
Member

saudet commented May 17, 2016

I've seen crashes like that with older system libraries on Linux before. Maybe the same bug is in the current version of libraries on Windows in MSYS2...

@DanLighter
Copy link
Author

one question, if i boot in linux and run procamcalib either 1.1 or 1.2 i shouldnt have the same problem?

@saudet
Copy link
Member

saudet commented May 17, 2016

It's possible, but I think it's a bug in some versions of the libraries that's used on both platforms...

@saudet
Copy link
Member

saudet commented May 21, 2016

Since this problem seems to be happening only during deallocation, you could try to set the "org.bytedeco.javacpp.nopointergc" system property to "true". This will lead to memory leaks, but the calibration session doesn't usually take too much time, so I don't think it would be an issue. :)

@saudet
Copy link
Member

saudet commented Dec 8, 2016

While doing some testing for the release of version 1.3, I encountered those crashes and setting the "org.bytedeco.javacpp.nopointergc" property to "true" does indeed work around the problem so I have added that flag to the launch script by default...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants