summaryrefslogtreecommitdiff
path: root/src/camera
diff options
context:
space:
mode:
Diffstat (limited to 'src/camera')
-rw-r--r--src/camera/veyeimx287m.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/camera/veyeimx287m.cpp b/src/camera/veyeimx287m.cpp
index c7e519a..d4c19fe 100644
--- a/src/camera/veyeimx287m.cpp
+++ b/src/camera/veyeimx287m.cpp
@@ -16,6 +16,7 @@
#include "constants.h"
#include "imagealgos.h"
+#include "mem_utils.h"
#include "pixels.h"
// #include "rotaryencoder.h"
@@ -80,7 +81,8 @@ std::vector<std::shared_ptr<ICamera> > VeyeIMX287m::search()
if (!cam->init())
return {};
- if (!cam->setExposureTimeUs(30))
+ // if (!cam->setExposureTimeUs(30))
+ if (!cam->setExposureTimeUs(250))
return {};
if (!cam->setLaserLevel(1))
@@ -143,7 +145,8 @@ bool VeyeIMX287m::init()
bool VeyeIMX287m::setExposureTimeUs(int valueUs)
{
//return true;
- std::cout << __func__ << ": " << valueUs << std::endl << std::flush;
+ std::cout << __func__ << ": " << V4L2_CID_EXPOSURE << " - " << valueUs << std::endl
+ << std::flush;
/*
* Shutter Time. Value is from 8721ns to 8721*885ns, must be integral
@@ -162,6 +165,7 @@ bool VeyeIMX287m::setExposureTimeUs(int valueUs)
// setLaserLevel(rand() % 100);
// int exp = rand() % 10;
// return setCamParam(V4L2_CID_EXPOSURE, exp * exp * exp * exp * exp * exp);
+ // return setCamParam(V4L2_CID_EXPOSURE, valueUs);
return setCamParam(V4L2_CID_EXPOSURE, valueUs);
}
@@ -218,7 +222,7 @@ bool VeyeIMX287m::setCamParam(unsigned int v4l2controlId, int value)
return false;
}
- // std::cout << __func__ << ": new value is " << ctl.value << std::endl;
+ std::cout << __func__ << ": new value is " << ctl.value << std::endl;
return true;
}
@@ -374,7 +378,13 @@ void VeyeIMX287m::calcFrameLoop(std::stop_token stopToken)
{
t.start();
// std::lock_guard buffer_lock{m_bufferMutexes[bufferIdx]};
- memcpy(&image.data, m_videoBuffers[bufferIdx], img_size);
+ // get: 4100-4500
+ // memcpy(&image.data, m_videoBuffers[bufferIdx], img_size);
+ // get: 5000-5100
+ // memcpy_1by1<img_size>((std::byte *) &image.data,
+ // (std::byte *) m_videoBuffers[bufferIdx]);
+ memcpy_neon<img_size / sizeof(ARRAY_TYPE)>((ARRAY_TYPE *) &image.data,
+ (ARRAY_TYPE *) m_videoBuffers[bufferIdx]);
get_elapsed_ns += t.nsecsElapsed();
}