Skip to content

Commit

Permalink
Updated readme, finishing doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tsing committed Apr 3, 2017
1 parent 2a7043a commit 5982af6
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 16 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ Structured light scanner is a tool to reconstruct point cloud from series of ima

In this version, the reconstruction process is reimplemented both on CPU and GPU. Both versions accelerate the reconstruction time. Especially the later one.


## Dependencies
* OpenCV2
* CUDA (6.0+)
* glm

## Howto
### How it works

The main building blocks of the libraries are `ImageProcessor` and `Reconstructor`. Image processors take images, projector parameters and camera calibration parameters as input and produce `Buckets`. `Reconstructor` combines all the Buckets to generate the point cloud.
![Alt text](https://cdn.rawgit.com/theICTlab/3DUNDERWORLD-SLS-GPU_CPU/dev/doc/how-it-works.svg)



### Compile and run demo binaries
Demo binaries and data is included. A CMake script is included to compile the binaries and libraries.
```bash
Expand Down
Binary file modified doc/how-it-works.dia
Binary file not shown.
39 changes: 29 additions & 10 deletions doc/how-it-works.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/setup.dia
Binary file not shown.
6 changes: 5 additions & 1 deletion src/app/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ int main(int argc, char** argv)
rightCamProcessor.loadConfig(rightConfigFile);
leftCamProcessor.loadConfig(leftConfigFile);

// Construct a projector parameter provider
SLS::Projector proj(p.get<size_t>("width"),p.get<size_t>("height"));

// Generate reconstruction buckets from image processors
// Generate reconstruction buckets from image processors.
// generateBuckets function requires parameter extracted from the `Projector` object,
// namely projector width, height and number of frames required to reconstruct with the
// projected patterns.
std::vector<SLS::Buckets> bucketsVec
{
rightCamProcessor.generateBuckets(proj.getWidth(), proj.getHeight(), proj.getRequiredNumFrames()),
Expand Down
10 changes: 5 additions & 5 deletions src/lib/core/ImageProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
#include "Ray.h"

namespace SLS {
/*! Base class of camera

using Bucket = std::vector<Ray>;
using Buckets = std::vector<Bucket>;

/*! Base class of image processor
*
* The camera defined here is a specific image input device for reconstruction
* which includes the full acquisition pipeline.
Expand All @@ -53,10 +57,6 @@ namespace SLS {
* parameters.
*
*/

using Bucket = std::vector<Ray>;
using Buckets = std::vector<Bucket>;

class ImageProcessor {
protected:
// Name of camera
Expand Down

0 comments on commit 5982af6

Please sign in to comment.