3DUNDERWORLD-SLS-GPU_CPU icon indicating copy to clipboard operation
3DUNDERWORLD-SLS-GPU_CPU copied to clipboard

the array index out of range

Open chenshida opened this issue 5 years ago • 6 comments

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?

chenshida avatar Jun 13 '19 05:06 chenshida

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!

v3c70r avatar Jun 14 '19 14:06 v3c70r

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

chenshida avatar Jun 18 '19 00:06 chenshida

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.

selfex22 avatar Jul 09 '19 15:07 selfex22

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

alefellin avatar Aug 02 '19 15:08 alefellin

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

chenshida avatar Aug 07 '19 09:08 chenshida

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?

mishradm2472 avatar Apr 29 '21 05:04 mishradm2472