Commit 0e2239cc authored by Locatelli's avatar Locatelli
Browse files

Merge remote-tracking branch 'origin/V3.2_191' into ploty2

parents 33b6d4f3 4ee2d1b2
......@@ -506,44 +506,44 @@ std::string VEXPController::getSpyData() {
writer.StartObject();
writer.Key("as"); writer.Double(as());
writer.Key("bs"); writer.Double(bs());
writer.Key("cs"); writer.Double(cs());
writer.Key("aa"); writer.Double(aa());
writer.Key("bb"); writer.Double(bb());
writer.Key("cc"); writer.Double(cc());
writer.Key("ax"); writer.Double(ax());
writer.Key("ay"); writer.Double(ay());
writer.Key("az"); writer.Double(az());
writer.Key("bx"); writer.Double(bx());
writer.Key("by"); writer.Double(by());
writer.Key("bz"); writer.Double(bz());
writer.Key("qh"); writer.Double(qh());
writer.Key("qk"); writer.Double(qk());
writer.Key("ql"); writer.Double(ql());
writer.Key("en"); writer.Double(en());
writer.Key("qm"); writer.Double(qm());
writer.Key("as"); writer.Double(toDouble(as()));
writer.Key("bs"); writer.Double(toDouble(bs()));
writer.Key("cs"); writer.Double(toDouble(cs()));
writer.Key("aa"); writer.Double(toDouble(aa()));
writer.Key("bb"); writer.Double(toDouble(bb()));
writer.Key("cc"); writer.Double(toDouble(cc()));
writer.Key("ax"); writer.Double(toDouble(ax()));
writer.Key("ay"); writer.Double(toDouble(ay()));
writer.Key("az"); writer.Double(toDouble(az()));
writer.Key("bx"); writer.Double(toDouble(bx()));
writer.Key("by"); writer.Double(toDouble(by()));
writer.Key("bz"); writer.Double(toDouble(bz()));
writer.Key("qh"); writer.Double(toDouble(qh()));
writer.Key("qk"); writer.Double(toDouble(qk()));
writer.Key("ql"); writer.Double(toDouble(ql()));
writer.Key("en"); writer.Double(toDouble(en()));
writer.Key("qm"); writer.Double(toDouble(qm()));
writer.Key("fx"); writer.Int(fx());
writer.Key("ss"); writer.Int(ss());
writer.Key("ki"); writer.Double(ki());
writer.Key("kf"); writer.Double(kf());
writer.Key("ki"); writer.Double(toDouble(ki()));
writer.Key("kf"); writer.Double(toDouble(kf()));
writer.Key("qhScan"); writer.Double(qhScan());
writer.Key("qkScan"); writer.Double(qkScan());
writer.Key("qlScan"); writer.Double(qlScan());
writer.Key("enScan"); writer.Double(enScan());
writer.Key("qhScan"); writer.Double(toDouble(qhScan()));
writer.Key("qkScan"); writer.Double(toDouble(qkScan()));
writer.Key("qlScan"); writer.Double(toDouble(qlScan()));
writer.Key("enScan"); writer.Double(toDouble(enScan()));
writer.Key("dqhScan"); writer.Double(dqhScan());
writer.Key("dqkScan"); writer.Double(dqkScan());
writer.Key("dqlScan"); writer.Double(dqlScan());
writer.Key("denScan"); writer.Double(denScan());
writer.Key("dqhScan"); writer.Double(toDouble(dqhScan()));
writer.Key("dqkScan"); writer.Double(toDouble(dqkScan()));
writer.Key("dqlScan"); writer.Double(toDouble(dqlScan()));
writer.Key("denScan"); writer.Double(toDouble(denScan()));
writer.Key("nbPointsScan"); writer.Int(nbPointsScan());
writer.Key("kiScan"); writer.Double(kiScan());
writer.Key("kfScan"); writer.Double(kfScan());
writer.Key("kiScan"); writer.Double(toDouble(kiScan()));
writer.Key("kfScan"); writer.Double(toDouble(kfScan()));
writer.Key("fxScan"); writer.Int(fxScan());
writer.Key("ssScan"); writer.Int(ssScan());
......
......@@ -273,7 +273,7 @@ bool CCameraControl::ExposureFeatureBGAPI() {
// check if the feature is writeable and write new value
if (exposure_node->IsWriteable()) {
exposure_node->SetDouble(exposure_time_);
std::cout <<"e>>>>>>>>>>>>>>>>exposure_time_ OK "<<camera_pointer_->GetRemoteNode("ExposureTimeRaw")->GetValue() << std::endl;
// std::cout <<"e>>>>>>>>>>>>>>>>exposure_time_ OK "<<camera_pointer_->GetRemoteNode("ExposureTimeRaw")->GetValue() << std::endl;
}
BGAPI2::Node* exposure_gain = camera_pointer_->GetRemoteNode("GainRaw");
......@@ -281,16 +281,16 @@ bool CCameraControl::ExposureFeatureBGAPI() {
if (exposure_gain->IsWriteable()) {
exposure_gain->SetInt(exposure_gain_);
}
std::cout <<"e>>>>>>>>>>>>>>>>GainRaw OK "<<camera_pointer_->GetRemoteNode("GainRaw")->GetValue() << std::endl;
// std::cout <<"e>>>>>>>>>>>>>>>>GainRaw OK "<<camera_pointer_->GetRemoteNode("GainRaw")->GetValue() << std::endl;
BGAPI2::Node* pixel_format = camera_pointer_->GetRemoteNode("PixelFormat");
std::cout <<"e>>>>>>>>>>>>>>>>pixel format OK "<<camera_pointer_->GetRemoteNode("PixelFormat")->GetValue() << std::endl;
// std::cout <<"e>>>>>>>>>>>>>>>>pixel format OK "<<camera_pointer_->GetRemoteNode("PixelFormat")->GetValue() << std::endl;
// check if the feature is writeable and write new value
if (pixel_format->IsWriteable()) {
pixel_format->SetString("YUV422_YUYV_Packed");
}
std::cout <<"e>>>>>>>>>>>>>>>>pixel format OK "<<camera_pointer_->GetRemoteNode("PixelFormat")->GetValue() << std::endl;
// std::cout <<"e>>>>>>>>>>>>>>>>pixel format OK "<<camera_pointer_->GetRemoteNode("PixelFormat")->GetValue() << std::endl;
// write some status information
std::lock_guard<std::mutex> lock(feature_command_message_list_lock_);
feature_command_message_list_.clear();
......@@ -424,7 +424,7 @@ bool CCameraControl::CaptureBGAPIImages(const bool * abort_flag, unsigned int nu
// loop over the number of images to capture
do {
// fetch the buffers
BGAPI2::Buffer* buffer = datastream_pointer->GetFilledBuffer(exposure_time_ + 1000);
BGAPI2::Buffer* buffer = datastream_pointer->GetFilledBuffer(exposure_time_ );
if (buffer) {
std::cout <<"GetFilledBuffer OK "<< number_of_captured_images_<< " of " <<number_of_images_ <<std::endl;
FillBufferInformation(datastream_pointer, buffer);
......@@ -478,8 +478,9 @@ bool CCameraControl::StartStreamingBGAPI() {
datastream_pointer->GetBufferList()->DiscardAllBuffers();
datastream_pointer->GetBufferList()->FlushAllToInputQueue();
// start the acquisition on the host side with the selected number of images
datastream_pointer->StartAcquisition(number_of_images_);
// start the acquisition on the device side
datastream_pointer->StartAcquisitionContinuous();
// datastream_pointer->StartAcquisition(number_of_images_);
// start the acquisition on the device side
// to work with this example the device must be in free running mode
if (camera_pointer_->GetRemoteNode("AcquisitionStart")->IsWriteable()) {
camera_pointer_->GetRemoteNode("AcquisitionStart")->Execute();
......
......@@ -130,6 +130,9 @@ void GenericCamDriver::execute(const std::string& aCommand) {
}
GenericCamState* currentState = dynamic_cast<GenericCamState*>(getCurrentState());
// Check command
cout << "GenericCamDriver::stop() " << aCommand<< endl;
if (aCommand == driver::INIT_COMMAND) {
// Init command
currentState->init();
......
......@@ -4,7 +4,15 @@
<link lib="opencv_core"/>
<link lib="opencv_calib3d"/>
<link lib="opencv_highgui"/>
<link path="/opt/pylon/lib" lib="GenApi_gcc_v3_1_Basler_pylon"/>
<link path="/opt/pylon/lib" lib="pylonbase" />
<link path="/opt/pylon/lib" lib="GCBase_gcc_v3_1_Basler_pylon"/>
<link path="/opt/pylon/lib" lib="pylonutility"/>
<link lib="opencv_core"/>
<link lib="opencv_calib3d"/>
<link lib="opencv_highgui"/>
<include path="/opt/baumer-gapi-sdk/include/bgapi2_genicam"/>
<include path="/opt/pylon/include"/>
<include path="$(NOMAD_HOME)/../NomadModules/src"/>
</module>
......@@ -30,6 +30,7 @@
#include "DoubleBufferHandler.h"
#include "GenericCamDef.h"
#include "GenericCamState.h"
#include </opt/pylon/include/pylon/PylonIncludes.h>
namespace genericcam {
......@@ -116,6 +117,8 @@ public:
// int32 GetAvailableGenericCameras();
// std::string getConfigFile(BGAPI2::Device* device);
private:
......@@ -219,8 +222,8 @@ private:
// perform a mean value calculation used by the calculation thread
void DoCalculation(CCameraControl * camera_control);
void stopLiveAcq();
void startLiveAcq();
// instantiate the camera handler
CCameraHandler m_camera_handler;
......@@ -245,6 +248,13 @@ private:
Counter m_TimeCounter;
Pylon::CInstantCamera *camera = nullptr;
int64 cameraNum_ = 1; //��ǰ������������ܸ���
std::string cameraName_;
};
}
......
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