mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
reverted rawImageSizeCaptured parameter... (because OpenCV has already a default so native image over 640x480 cannot be extracted)
git-svn-id: http://rtabmap.googlecode.com/svn/branches/0.3/rtabmap@68 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -37,7 +37,6 @@ void showUsage()
|
||||
" -device #: Id of the webcam (default 0)\n"
|
||||
" -width #: Image width (default 640)\n"
|
||||
" -height #: Image height (default 480)\n"
|
||||
" -rawSize Resize image after capturing the with default size\n"
|
||||
" -fps #.#: Frame rate (Hz) (default 2.0)\n"
|
||||
" -hide : Image not shown while capturing (default true)\n"
|
||||
" -dir \"path\": Path of the images saved (default \"./imagesCaptured\")\n"
|
||||
@@ -122,7 +121,6 @@ int main(int argc, char * argv[])
|
||||
int usbDevice = 0;
|
||||
int imageWidth = 640;
|
||||
int imageHeight = 480;
|
||||
bool rawSize = false;
|
||||
float imageRate = 2.0;
|
||||
int startId = 1;
|
||||
std::string extension = "jpg";
|
||||
@@ -217,7 +215,6 @@ int main(int argc, char * argv[])
|
||||
" device=%d\n"
|
||||
" width=%d\n"
|
||||
" height=%d\n"
|
||||
" rawSize=%s\n"
|
||||
" hz=%f\n"
|
||||
" show=%s\n"
|
||||
" dir=%s\n"
|
||||
@@ -227,7 +224,6 @@ int main(int argc, char * argv[])
|
||||
usbDevice,
|
||||
imageWidth,
|
||||
imageHeight,
|
||||
uBool2str(rawSize).c_str(),
|
||||
imageRate,
|
||||
uBool2str(show).c_str(),
|
||||
targetDirectory.c_str(),
|
||||
@@ -237,7 +233,7 @@ int main(int argc, char * argv[])
|
||||
|
||||
UDirectory::makeDir(targetDirectory);
|
||||
|
||||
rtabmap::CameraVideo cam(usbDevice, rawSize, imageRate, false, imageWidth, imageHeight);
|
||||
rtabmap::CameraVideo cam(usbDevice, imageRate, false, imageWidth, imageHeight);
|
||||
if(!cam.init())
|
||||
{
|
||||
printf("Can't initialize the camera...\n");
|
||||
|
||||
@@ -176,7 +176,6 @@ public:
|
||||
|
||||
public:
|
||||
CameraVideo(int usbDevice = 0,
|
||||
bool rawImageSizeCaptured = false,
|
||||
float imageRate = 0,
|
||||
bool autoRestart = false,
|
||||
unsigned int imageWidth = 0,
|
||||
@@ -200,7 +199,6 @@ private:
|
||||
|
||||
// Usb camera
|
||||
int _usbDevice;
|
||||
bool _rawImageSizeCaptured;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -438,7 +438,6 @@ IplImage * CameraImages::takeImage()
|
||||
// CameraVideo
|
||||
/////////////////////////
|
||||
CameraVideo::CameraVideo(int usbDevice,
|
||||
bool rawImageSizeCaptured,
|
||||
float imageRate,
|
||||
bool autoRestart,
|
||||
unsigned int imageWidth,
|
||||
@@ -446,8 +445,7 @@ CameraVideo::CameraVideo(int usbDevice,
|
||||
Camera(imageRate, autoRestart, imageWidth, imageHeight),
|
||||
_capture(0),
|
||||
_src(kUsbDevice),
|
||||
_usbDevice(usbDevice),
|
||||
_rawImageSizeCaptured(rawImageSizeCaptured)
|
||||
_usbDevice(usbDevice)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -485,7 +483,7 @@ bool CameraVideo::init()
|
||||
{
|
||||
ULOGGER_DEBUG("CameraVideo::init() Usb device initialization on device %d with imgSize=[%d,%d]", _usbDevice, getImageWidth(), getImageHeight());
|
||||
_capture = cvCaptureFromCAM(_usbDevice);
|
||||
if(_capture && getImageWidth() && getImageHeight() && !_rawImageSizeCaptured)
|
||||
if(_capture && getImageWidth() && getImageHeight())
|
||||
{
|
||||
cvSetCaptureProperty(_capture, CV_CAP_PROP_FRAME_WIDTH, double(getImageWidth()));
|
||||
cvSetCaptureProperty(_capture, CV_CAP_PROP_FRAME_HEIGHT, double(getImageHeight()));
|
||||
|
||||
Reference in New Issue
Block a user