almost all parameters working. remaining after gamma

parent 928e639d
......@@ -20,7 +20,7 @@ SET( CMAKE_BUILD_TYPE Release)
INCLUDE (${PROJECT_SOURCE_DIR}/FindmvIMPACT.cmake)
#find the cv support and set HAVE_OPENCV_H for the conditional compilation
FIND_PACKAGE(OpenCV 2.4)
FIND_PACKAGE(OpenCV)
if (OpenCV_FOUND)
if (${OpenCV_VERSION_MAJOR} GREATER 1)
......
......@@ -93,6 +93,7 @@ int main(int argc, char *argv[])
for (int ii = 0; ii < num_cams; ++ii)
{
CMvbluefox3::CParams params; //default parameters.
params.pixel_format = CMvbluefox3::rgb8;
cam_ptr[ii]->SetConfig(params);
}
......
......@@ -49,6 +49,15 @@ CMvbluefox3::~CMvbluefox3()
void CMvbluefox3::OpenDevice(void)
{
// customDataDirectory
// userControlledImageProcessingEnable
// Default firmware settings.
//The device will be initialized with the drivers default values.
// WriteProperty(this->device_->loadSettings, dlsNoLoad);
// WriteProperty(this->device_->userControlledImageProcessingEnable, bTrue);
// Open the device
try { this->device_->open(); }
catch(mvIMPACT::acquire::ImpactAcquireException& e )
......@@ -454,15 +463,17 @@ void CMvbluefox3::SetAutoExposCtrl(bool &auto_expose, int &auto_upperlimit, int
throw CmvBlueFOX3Exception(_HERE_, "Auto Exposure Control option is not available for this model.");
try{
WriteProperty(this->ac_ctrl_->exposureAuto, auto_expose);
WriteProperty(this->ac_ctrl_->mvExposureAutoMode, 0);
if (auto_expose)
{
WriteProperty(this->ac_ctrl_->exposureAuto, 1);
WriteProperty(this->ac_ctrl_->mvExposureAutoUpperLimit, auto_upperlimit);
WriteProperty(this->ac_ctrl_->mvExposureAutoAverageGrey, des_gray_val);
}
else
{
WriteProperty(this->ac_ctrl_->exposureAuto, 0);
WriteProperty(this->ac_ctrl_->exposureTime, expose_us);
}
}catch (CmvBlueFOX3Exception& e) {
throw CmvBlueFOX3Exception(_HERE_, "Unable to Set Auto Exposure Control: " + e.what() );
}
......@@ -601,7 +612,6 @@ void CMvbluefox3::SetFrameRate(int &rate)
WriteProperty(this->ac_ctrl_->mvAcquisitionFrameRateLimitMode,0);
WriteProperty(this->ac_ctrl_->acquisitionFrameRateEnable, bTrue);
WriteProperty(this->ac_ctrl_->acquisitionFrameRate, rate);
WriteProperty(this->ac_ctrl_->acquisitionFrameRateEnable, bFalse);
}catch (CmvBlueFOX3Exception& e) {
throw CmvBlueFOX3Exception(_HERE_, "Unable to set frame rate: " + e.what() );
}
......
......@@ -21,15 +21,15 @@ codings_t MVFormatToEncoding(const TImageDestinationPixelFormat& pixel_format)
case idpfMono12Packed_V2: coding = mono12v2; break; //*
case idpfMono14: coding = mono14; break; //*
case idpfMono16: coding = mono16; break;
case idpfBGR888Packed: coding = bgr8; break;
case idpfRGB888Planar: coding = rgb8p; break; //*
case idpfRGBx888Planar: coding = rgba8p; break; //*
case idpfRGB888Packed: coding = rgb8; break;
case idpfRGB101010Packed: coding = rgb10; break; //*
case idpfRGB121212Packed: coding = rgb12; break; //*
case idpfRGB141414Packed: coding = rgb14; break; //*
case idpfRGB161616Packed: coding = rgb16; break;
case idpfRGBx888Packed: coding = rgba8; break;
case idpfBGR888Packed: coding = rgb8; break;
case idpfRGB888Planar: coding = bgr8p; break; //*
case idpfRGBx888Planar: coding = bgra8p; break; //*
case idpfRGB888Packed: coding = bgr8; break;
case idpfRGB101010Packed: coding = bgr10; break; //*
case idpfRGB121212Packed: coding = bgr12; break; //*
case idpfRGB141414Packed: coding = bgr14; break; //*
case idpfRGB161616Packed: coding = bgr16; break;
case idpfRGBx888Packed: coding = bgra8; break;
case idpfYUV411_UYYVYY_Packed: coding = yuv411uyyvyy; break; //*
case idpfYUV422Packed: coding = yuv422; break;
case idpfYUV422Planar: coding = yuv422p; break; //*
......@@ -58,16 +58,16 @@ TImageDestinationPixelFormat EncodingToMVFormat(const codings_t& coding)
case mono12v2: idpf = idpfMono12Packed_V2; break; //*
case mono14: idpf = idpfMono14; break; //*
case mono16: idpf = idpfMono16; break;
case bgr8: idpf = idpfBGR888Packed; break;
case rgb8p: idpf = idpfRGB888Planar; break; //*
case rgba8p: idpf = idpfRGBx888Planar; break; //*
case bgr10v2: idpf = idpfBGR101010Packed_V2; break; //*
case rgb8: idpf = idpfRGB888Packed; break;
case rgb10: idpf = idpfRGB101010Packed; break; //*
case rgb12: idpf = idpfRGB121212Packed; break; //*
case rgb14: idpf = idpfRGB141414Packed; break; //*
case rgb16: idpf = idpfRGB161616Packed; break;
case rgba8: idpf = idpfRGBx888Packed; break;
case rgb8: idpf = idpfBGR888Packed; break;
case bgr8p: idpf = idpfRGB888Planar; break; //*
case bgra8p: idpf = idpfRGBx888Planar; break; //*
case rgb10v2: idpf = idpfBGR101010Packed_V2; break; //*
case bgr8: idpf = idpfRGB888Packed; break;
case bgr10: idpf = idpfRGB101010Packed; break; //*
case bgr12: idpf = idpfRGB121212Packed; break; //*
case bgr14: idpf = idpfRGB141414Packed; break; //*
case bgr16: idpf = idpfRGB161616Packed; break;
case bgra8: idpf = idpfRGBx888Packed; break;
case yuv411uyyvyy: idpf = idpfYUV411_UYYVYY_Packed; break; //*
case yuv422: idpf = idpfYUV422Packed; break;
case yuv422p: idpf = idpfYUV422Planar; break; //*
......
......@@ -27,16 +27,16 @@ namespace CMvbluefox3 {
ENCODING(mono12v2) \
ENCODING(mono14) \
ENCODING(mono16) \
ENCODING(rgb8) \
ENCODING(rgb8p) \
ENCODING(rgb10) \
ENCODING(rgb12) \
ENCODING(rgb14) \
ENCODING(rgb16) \
ENCODING(rgba8) \
ENCODING(rgba8p) \
ENCODING(bgr8) \
ENCODING(bgr10v2) \
ENCODING(bgr8p) \
ENCODING(bgr10) \
ENCODING(bgr12) \
ENCODING(bgr14) \
ENCODING(bgr16) \
ENCODING(bgra8) \
ENCODING(bgra8p) \
ENCODING(rgb8) \
ENCODING(rgb10v2) \
ENCODING(yuv411uyyvyy) \
ENCODING(yuv422) \
ENCODING(yuv422p) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment