Skip to content

Commit

Permalink
1. Improved accuracy of normal vectors for the points in the point cl…
Browse files Browse the repository at this point in the history
…oud. This improves the Poisson surface reconstruction in MeshLab or other program.

2. Improved laser detection when the background is not static.
3. Added meshing support for PLY files.  The PLY files now contain the point cloud and the triangle mesh, eliminating the need for STL in most cases.
4. The test image now shows results from both lasers in the same image when the Preset is configured to scan with Both Lasers.
5. The test image now omits points that would be removed by the ground plane height and max object size parameters.
6. The scan Preview link has been changed to a button.
7. The name of the active preset is now displayed on the main page.
8. Fixed an issue where 5MP video mode would only use the center of the camera's view instead of the full field of view.
  • Loading branch information
hairu committed May 17, 2015
1 parent aa1b457 commit a1a99a6
Show file tree
Hide file tree
Showing 31 changed files with 1,105 additions and 4,838 deletions.
3,313 changes: 0 additions & 3,313 deletions contrib/license.txt.h

This file was deleted.

5 changes: 3 additions & 2 deletions src/Calibrator.cpp
Expand Up @@ -85,7 +85,7 @@ bool Calibrator::detectLaserX(real * laserX, PixelLocation& topLocation, PixelLo
bool detected = false;
ImageProcessor imageProcessor;
int firstRowLaserCol = 0;
real percentPixelsOverThreshold = 0;
int numBad1, numBad2;
int numLocations = 0;
int maxNumLocations = camera->getImageHeight();
PixelLocation * laserLocations = new PixelLocation[maxNumLocations];
Expand All @@ -98,7 +98,8 @@ bool Calibrator::detectLaserX(real * laserX, PixelLocation& topLocation, PixelLo
laserLocations,
maxNumLocations,
firstRowLaserCol,
percentPixelsOverThreshold,
numBad1,
numBad2,
NULL);

//
Expand Down
41 changes: 32 additions & 9 deletions src/Camera.cpp
Expand Up @@ -29,11 +29,15 @@
namespace freelss
{

#define VIDEO_CAMERA_TYPE Camera::CT_MMALVIDEO
//#define VIDEO_CAMERA_TYPE Camera::CT_RASPICAM

CriticalSection Camera::m_cs = CriticalSection();
Camera * Camera::m_instance = NULL;
Camera::CameraType Camera::m_cameraType = Camera::CT_RASPICAM;
Camera::CameraType Camera::m_cameraType = VIDEO_CAMERA_TYPE;
int Camera::m_reqImageWidth = 0;
int Camera::m_reqImageHeight = 0;
int Camera::m_reqFrameRate = 0;

Camera::Camera()
{
Expand All @@ -58,7 +62,7 @@ Camera * Camera::getInstance()
}
else if (m_cameraType == Camera::CT_RASPICAM)
{
std::cout << "Creating video mode camera resolution=" << m_reqImageWidth << "x" << m_reqImageHeight << std::endl;
std::cout << "Creating Raspicam video mode camera resolution=" << m_reqImageWidth << "x" << m_reqImageHeight << std::endl;
m_instance = new RaspicamCamera(m_reqImageWidth, m_reqImageHeight);
}
else if (m_cameraType == Camera::CT_MMALSTILL)
Expand All @@ -68,7 +72,8 @@ Camera * Camera::getInstance()
}
else if (m_cameraType == Camera::CT_MMALVIDEO)
{
m_instance = new MmalVideoCamera();
std::cout << "Creating MMAL video mode camera resolution=" << m_reqImageWidth << "x" << m_reqImageHeight << std::endl;
m_instance = new MmalVideoCamera(m_reqImageWidth, m_reqImageHeight, m_reqFrameRate);
}
else
{
Expand Down Expand Up @@ -109,37 +114,54 @@ void Camera::reinitialize()
Camera::CameraType type;
int reqImageWidth;
int reqImageHeight;
int reqFrameRate;

switch (cameraMode)
{
case CM_STILL_5MP:
type = CT_MMALSTILL;
reqImageWidth = 2592;
reqImageHeight = 1944;
reqFrameRate = 15;
break;

case CM_VIDEO_5MP:
type = CT_RASPICAM;
reqImageWidth = 2560;
reqImageHeight = 1920;
type = VIDEO_CAMERA_TYPE;
reqImageWidth = 2592;
reqImageHeight = 1944;
reqFrameRate = 15;
//reqImageHeight = 1944;
//reqImageWidth = 2560;
//reqImageHeight = 1920;
break;

case CM_VIDEO_HD:
type = CT_RASPICAM;
type = VIDEO_CAMERA_TYPE;
reqImageWidth = 1600;
reqImageHeight = 1200;
reqFrameRate = 30;
break;

case CM_VIDEO_1P2MP:
type = CT_RASPICAM;
type = VIDEO_CAMERA_TYPE;
//reqImageWidth = 1296;
//reqImageHeight = 972;
reqImageWidth = 1280;
reqImageHeight = 960;
//reqImageWidth = 1312;
//reqImageHeight = 984;
//reqImageWidth = 1324;
//reqImageHeight = 993;
//reqImageWidth = 1288;
//reqImageHeight = 966;
reqFrameRate = 42;
break;

case CM_VIDEO_VGA:
type = VIDEO_CAMERA_TYPE;
reqImageWidth = 640;
reqImageHeight = 480;
type = CT_RASPICAM;
reqFrameRate = 60;
break;

default:
Expand All @@ -159,6 +181,7 @@ void Camera::reinitialize()
m_cameraType = type;
m_reqImageWidth = reqImageWidth;
m_reqImageHeight = reqImageHeight;
m_reqFrameRate = reqFrameRate;
}
}
catch (...)
Expand Down
3 changes: 3 additions & 0 deletions src/Camera.h
Expand Up @@ -96,6 +96,9 @@ class Camera

/** The requested image height */
static int m_reqImageHeight;

/** The requested frame rate */
static int m_reqFrameRate;
};

}

0 comments on commit a1a99a6

Please sign in to comment.