jakobwilm / slstudio

SLStudio -- Real Time Structured Light. A comprehensive software suite for capturing and reconstructing 3D scenes with a camera-projector pair.
Other
515 stars 194 forks source link

Problem with 3D reconstruction #24

Closed chrisvizes closed 6 years ago

chrisvizes commented 6 years ago

Hi Jakob,

Upon calibration, we receive the following results. Then using this calibration and the attached preferences, we get a 3D reconstruction that looks like the other image attached.

It appears to us that the object shown in the 3D reconstruction should be at the crossing of the axis lines, but is instead displaced some amount rendering it hard to view.

We are also under the impression that the feint 3D reconstruction shown is not, in fact, a 3D reconstruction, but instead just our camera frames, which seems bizarre.

Do you have any ideas or resolutions on how we can fix this?

We are using ubuntu 16.04 64-bit with the latest branch of slstudio, with a minor change to use pcl 1.7 instead of 1.8 (changing the version in the slstudio.pro file). Is this version change the issue?

Hardware: DLP lightcrafter 3500 (with a modification to output a 5V trigger signal by moving some resistors on its PCB) Ximea Xiq MQ013MG-E2

screenshot from 2018-03-19 16-03-52

screenshot from 2018-03-19 15-51-32 `======================================== Camera Calibration:

screenshot from 2018-03-19 15-52-41

jakobwilm commented 6 years ago

Hello.

The projector calibration fails. You must definately fix thia before you can expect any reasonable results. Your delay parameter in the settings seema very short. Most projectors have considerable input latency. After fixing that, please make sure that the projector-camera response is linear, as discussed in several previous messages. Good luck!

/Jakob

On 19 Mar 2018, at 17:14, meardon notifications@github.com<mailto:notifications@github.com> wrote:

Hi Jakob,

Upon calibration, we receive the following results. Then using this calibration and the attached preferences, we get a 3D reconstruction that looks like the other image attached.

It appears to us that the object shown in the 3D reconstruction should be at the crossing of the axis lines, but is instead displaced some amount rendering it hard to view.

We are also under the impression that the feint 3D reconstruction shown is not, in fact, a 3D reconstruction, but instead just our camera frames, which seems bizarre.

Do you have any ideas or resolutions on how we can fix this?

We are using ubuntu 16.04 64-bit with the latest branch of slstudio, with a minor change to use pcl 1.7 instead of 1.8 (changing the version in the slstudio.pro file). Is this version change the issue?

Hardware: DLP lightcrafter 3500 (with a modification to output a 5V trigger signal by moving some resistors on its PCB) Ximea Xiq MQ013MG-E2

[screenshot from 2018-03-19 16-03-52]https://user-images.githubusercontent.com/34161309/37607224-5fd63086-2b8f-11e8-916f-10bdf48eebbb.png

[screenshot from 2018-03-19 15-51-32]https://user-images.githubusercontent.com/34161309/37607049-e850f53c-2b8e-11e8-99e0-7cec9a0fa36c.png `======================================== Camera Calibration:

[screenshot from 2018-03-19 15-52-41]https://user-images.githubusercontent.com/34161309/37607046-e4999322-2b8e-11e8-9f15-209ad09ef6a0.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/jakobwilm/slstudio/issues/24, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEQSmK16uqaxSwHJ9-ft6ms5VNgVhKKVks5tf9lYgaJpZM4SwdLJ.

nikkadim commented 6 years ago

@meardon tune gamma correction on GPU to get rid of stripes on calibration pimages.

chrisvizes commented 6 years ago

Hi Jakob,

Thank you very much for your response. We have increased our delay setting to: 100ms.

We have also found that updating a graphics driver has improved our calibrations but a large amount.

However, we are trying to use the matlab script that you provided and we are having difficulties. Do we need to change any of the code in the matlab files to get any results, or should we just be running a particular file from the folder within matlab?

We have run determinegammaresponse and we are getting the error: `Warning: The following error was caught while executing 'Projector' class destructor: Undefined function 'ProjectorMex' for input arguments of type 'char'.

Error in Projector/delete (line 24) ProjectorMex('delete', this.objectHandle);

Error in Projector (line 18) function this = Projector(screenNum)

Error in determineGammaResponse (line 5) p = Projector(1);

In Projector (line 18) In determineGammaResponse (line 5) Undefined function or variable 'ProjectorMex'.

Error in Projector (line 19) this.objectHandle = ProjectorMex('new', screenNum);

Error in determineGammaResponse (line 5) p = Projector(1);`

@nikkadim we have found how to tune the gamma response we are just not currently able to measure it after the processing of the camera and projector.

Thanks, Chris

jakobwilm commented 6 years ago

Hi Chris,

You will need to compile the mex-functions, which wrap C++ into Matlab callable functions. The make.m script should handle that, but there may be adjustments necessary depending on your compiler, library versions, etc.

Jakob Wilm Postdoctoral Researcher DTU Compute

Technical University of Denmark Department of Applied Mathematics and Computer Science Richard Petersens Plads Building 321/220 2800 Lyngby jakw@dtu.dkmailto:jakw@dtu.dk +45 45 25 37 16 http://www.compute.dtu.dk

On 21 Mar 2018, at 11.54, meardon notifications@github.com<mailto:notifications@github.com> wrote:

Hi Jakob,

Thank you very much for your response. We have increased our delay setting to: 100ms.

We have also found that updating a graphics driver has improved our calibrations but a large amount.

However, we are trying to use the matlab script that you provided and we are having difficulties. Do we need to change any of the code in the matlab files to get any results, or should we just be running a particular file from the folder within matlab?

We have run determinegammaresponse and we are getting the error: `Warning: The following error was caught while executing 'Projector' class destructor: Undefined function 'ProjectorMex' for input arguments of type 'char'.

Error in Projector/delete (line 24) ProjectorMex('delete', this.objectHandle);

Error in Projector (line 18) function this = Projector(screenNum)

Error in determineGammaResponse (line 5) p = Projector(1);

In Projector (line 18) In determineGammaResponse (line 5) Undefined function or variable 'ProjectorMex'.

Error in Projector (line 19) this.objectHandle = ProjectorMex('new', screenNum);

Error in determineGammaResponse (line 5) p = Projector(1);`

@nikkadimhttps://github.com/nikkadim we have found how to tune the gamma response we are just not currently able to measure it after the processing of the camera and projector.

Thanks, Chris

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/jakobwilm/slstudio/issues/24#issuecomment-374898936, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEQSmPU34mhvNiNqqRfz-0SLjsqaa6v4ks5tgjFlgaJpZM4SwdLJ.

chrisvizes commented 6 years ago

Hi Jakob,

I apologise if I am being stupid here, I am new to matlab. Using matlab version 9.4.0.813654 (R2018a) we are getting a brace indexing error on line 32 of the make.m file. This is the line where the mex function is called. The exact error message is "Brace indexing is not supported for variables of this type" and then quoting line 32.

Is there something that we need to change or possibly is our matlab version incompatible?

Thanks Chris

jakobwilm commented 6 years ago

Hi Chris,

the syntax was indeed incompatible with the newer/st Matlab. I just pushed a few changes which should fix it.