jhdewitt / sltk

An OpenCV-based structured light processing toolkit.
MIT License
251 stars 63 forks source link

plotlens : segmentation fault. #21

Open prelard812 opened 4 years ago

prelard812 commented 4 years ago

Hi,

This is my first active participation to a git project ( 3d scanner is really cool) . I started to compile your project, two days ago and things are going well now. All my modules talk together, and now I'm trying to get my first camera calibration... but I got into problems with plotlens... I got a segmentation fault... Problem: the problem rises into the last loop to plot the grid image... pixb seems to be update to the first pixel of each row... so calculated index from this equation : **int idx = 3*(r*w+c);** will produce an overflow... I think you need to just calculate the offset of the current column with 3*C see corrected code below. What do you think of this... Maybe I don(r); for(int c=0; c