提交 912be18f 编写于 作者: G gineshidalgo99

Ip camera can write JSON files

上级 b0e5de3b
......@@ -2,7 +2,8 @@
namespace op
{
void enterAndTab(std::ofstream& ofstream, const bool humanReadable, const long long bracesCounter, const long long bracketsCounter)
void enterAndTab(std::ofstream& ofstream, const bool humanReadable, const long long bracesCounter,
const long long bracketsCounter)
{
try
{
......
......@@ -16,7 +16,7 @@ namespace op
{
try
{
return mPathName + "_" + VideoCaptureReader::getFrameName();
return VideoCaptureReader::getFrameName();
}
catch (const std::exception& e)
{
......
......@@ -4,7 +4,8 @@
namespace op
{
WebcamReader::WebcamReader(const int webcamIndex, const Point<int>& webcamResolution, const double fps, const bool throwExceptionIfNoOpened) :
WebcamReader::WebcamReader(const int webcamIndex, const Point<int>& webcamResolution, const double fps,
const bool throwExceptionIfNoOpened) :
VideoCaptureReader{webcamIndex, throwExceptionIfNoOpened},
mFps{fps},
mFrameNameCounter{-1},
......@@ -18,11 +19,14 @@ namespace op
{
set(CV_CAP_PROP_FRAME_WIDTH, webcamResolution.x);
set(CV_CAP_PROP_FRAME_HEIGHT, webcamResolution.y);
if ((int)get(CV_CAP_PROP_FRAME_WIDTH) != webcamResolution.x || (int)get(CV_CAP_PROP_FRAME_HEIGHT) != webcamResolution.y)
if ((int)get(CV_CAP_PROP_FRAME_WIDTH) != webcamResolution.x
|| (int)get(CV_CAP_PROP_FRAME_HEIGHT) != webcamResolution.y)
{
const std::string logMessage{ "Desired webcam resolution " + std::to_string(webcamResolution.x) + "x" + std::to_string(webcamResolution.y)
+ " could not being set. Final resolution: " + std::to_string(intRound(get(CV_CAP_PROP_FRAME_WIDTH))) + "x"
+ std::to_string(intRound(get(CV_CAP_PROP_FRAME_HEIGHT))) };
const std::string logMessage{ "Desired webcam resolution " + std::to_string(webcamResolution.x)
+ "x" + std::to_string(webcamResolution.y)
+ " could not being set. Final resolution: "
+ std::to_string(intRound(get(CV_CAP_PROP_FRAME_WIDTH))) + "x"
+ std::to_string(intRound(get(CV_CAP_PROP_FRAME_HEIGHT))) };
log(logMessage, Priority::Max, __LINE__, __FUNCTION__, __FILE__);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册