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

the array index out of range #14

Open
chenshida opened this issue Jun 13, 2019 · 6 comments
Open

the array index out of range #14

chenshida opened this issue Jun 13, 2019 · 6 comments

Comments

@chenshida
Copy link

I have study struct light recently, and useing this code, it can generate point cloud data with you given test data.but when I use myself data, the code can not work and it will raise in this code
bkts[vec2Idx.x * projHeight + vec2Idx.y].push_back(getRay(i));
I find that this calculate will cause array index of bkts out of range and code running exception.
On my occasion, I use projector resolution 912x1140, and the camera resolution is 1280x1024, and camera calibration is well done.why this problem occur? the code just support projector resolution 768x1024?

@v3c70r
Copy link
Member

v3c70r commented Jun 14, 2019

It should work fine with any resolution. We have tested it on projectors with 2 different resolutions.
Have you tried the CPU version?

Also if it is possible, could you send me the data you used, I will take a look when I get a chance.

Have a great day!

@chenshida
Copy link
Author

I`m already use CPU version.
could you give me an email ,I package my dataset to you.
Thanks.

@selfex22
Copy link

selfex22 commented Jul 9, 2019

I also get the same error.
If the problem is resolved, please respond.
And what is the resolution of the projector to use as a parameter?

my configuration is widows 10, visual studio, cpu version, data is alexander.

@alefellin
Copy link

Hey there!
I have the same problem. I'm trying to process some images using a GoPro hero 3+ camera and a portable projector (resolution 800x600). If I set width=800 and height=600 I obtain a "segmentation fault". If I use the default parameters (1024x768) it works but the point cloud is clearly wrong.
Can someone please help me?
Thanks a lot

@chenshida
Copy link
Author

This problem maybe a bug for Convert bitarray to gray code. In header file "DynamicBitset.h" , function "glm::uvec2 to_uint_gray ()", this code use a static bit convert like this

unsigned yDec = num & 0x3FFU;
unsigned xDec = num >> 10;

but in fact , it is deside by you projector resolution. in my situation, my projector resolution is 912x1120, so is like this:

unsigned yDec = num & 0x3FFU;
unsigned xDec = num >> 11;

for reference only, not guaranteed to be accurate

@mishradm2472
Copy link

make
[ 26%] Built target core
[ 26%] Building NVCC (Device) object src/lib/ReconstructorCUDA/CMakeFiles/sls_gpu.dir/sls_gpu_generated_ReconstructorCUDA.cu.o
In file included from /home/devd/3DUNDERWORLD-SLS-GPU_CPU/src/lib/ReconstructorCUDA/./ReconstructorCUDA.cu:3:
/home/devd/3DUNDERWORLD-SLS-GPU_CPU/src/lib/ReconstructorCUDA/./FileReaderCUDA.cuh:2:10: fatal error: core/FileReader.h: No such file or directory
#include <core/FileReader.h>
^~~~~~~~~~~~~~~~~~~
compilation terminated.
CMake Error at sls_gpu_generated_ReconstructorCUDA.cu.o.cmake:216 (message):
Error generating
/home/devd/3DUNDERWORLD-SLS-GPU_CPU/build/src/lib/ReconstructorCUDA/CMakeFiles/sls_gpu.dir//./sls_gpu_generated_ReconstructorCUDA.cu.o

make[2]: *** [src/lib/ReconstructorCUDA/CMakeFiles/sls_gpu.dir/build.make:79: src/lib/ReconstructorCUDA/CMakeFiles/sls_gpu.dir/sls_gpu_generated_ReconstructorCUDA.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:206: src/lib/ReconstructorCUDA/CMakeFiles/sls_gpu.dir/all] Error 2
make: *** [Makefile:95: all] Error 2
devd@devdatta:~/3DUNDERWORLD-SLS-GPU_CPU/build$

how to resolve this issue?

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

No branches or pull requests

5 participants