andybarry / makerscanner

Makerscanner Software
GNU General Public License v2.0
168 stars 70 forks source link

Update ScanThread.cpp to add interpolation #4

Closed nlanigan closed 9 years ago

nlanigan commented 10 years ago

Added interpolation to finding the laser's position (FindBrightestPixel). Uses GSL to create a graph of the laser profile. Enabled by setting INTER_MODE to > 0, disable by setting to 0 (default).

nlanigan commented 10 years ago

Hi,

I've been working with MakerScanner for a University project involving the creation of a high accuracy, low cost 3D scanner. I've added interpolation using various methods based on finding the graph of the laser profile and using this to determine the sub pixel location of the laser. The only drawback is the process is slow so isn't the best for real-time usage (I've made other modifications allowing a video file to be read frame by frame as well). I've left it disabled in this commit but is easily enabled by changing the INTER_MODE at line 306.

andybarry commented 10 years ago

Wow, awesome! Do you know why the diff is showing that almost every line changed? That seems strange. Did you switch between spaces-for-tabs and tabs or something?

nlanigan commented 10 years ago

I'm not sure why that's happened, when I committed to my branch it was only showing my changes, it wasn't until I did the pull request it was showing large blocks of deletion. I'll try it again when I get time.

nlanigan commented 9 years ago

Still having the same problem and I can't see why it is. When doing a commit only my changes show and using other diff tools give the same result. Spaces/tabs all exactly the same, just the diff in the pull showing it this way.

andybarry commented 9 years ago

Just occurred to me -- maybe your line endings are different? Looks like we're not the first to think about that: https://help.github.com/articles/dealing-with-line-endings/

nlanigan commented 9 years ago

Line endings seems to have been it. Committed the changes though there's a few lines I hadn't touched showing as changed (coincidentally the ones showing as unchanged originally) but seems to be mostly sorted now.

andybarry commented 9 years ago

Cool. I had to add a check in configure.ac to ensure that folks will know they need libgsl to compile now. All set, thanks for the hard work!