diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 9094566e..b673415d 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -296,7 +296,7 @@ CPhoneDevice::CPhoneCamera::~CPhoneCamera() m_dev = NULL; } -bool CPhoneDevice::CPhoneCamera::on_image(cv::Mat& rgb) +bool CPhoneDevice::CPhoneCamera::on_image(cv::Mat rgb) { if (m_dev != NULL) { @@ -3046,7 +3046,7 @@ int CPhoneDevice::CallExecv(int rotation, int frontCamera, const std::string& ou return exitCode; } -bool CPhoneDevice::OnImageReady(cv::Mat& mat) +bool CPhoneDevice::OnImageReady(cv::Mat mat) { time_t takingTime = time(NULL); if (mPhotoInfo.remedy != 0) @@ -3364,7 +3364,7 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat) return res; } -bool CPhoneDevice::PostProcessPhoto(const PHOTO_INFO& photoInfo, const vector& osds, const std::string& path, const std::string& cameraInfo, cv::Mat& mat) +bool CPhoneDevice::PostProcessPhoto(const PHOTO_INFO& photoInfo, const vector& osds, const std::string& path, const std::string& cameraInfo, cv::Mat mat) { int baseline = 0; cv::Size textSize; @@ -3598,6 +3598,12 @@ bool CPhoneDevice::PostProcessPhoto(const PHOTO_INFO& photoInfo, const vector characteristics, std::vector >& results, uint32_t ldr, uint32_t duration, std::vector >& frames); @@ -248,7 +248,7 @@ public: void UpdatePosition(double lon, double lat, double radius, time_t ts); bool OnVideoReady(bool photoOrVideo, bool result, const char* path, unsigned int photoId); - bool OnCaptureReady(bool photoOrVideo, bool result, cv::Mat& mat, unsigned int photoId); + bool OnCaptureReady(bool photoOrVideo, bool result, cv::Mat mat, unsigned int photoId); void UpdateSignalLevel(int signalLevel); void UpdateTfCardPath(const std::string& tfCardPath) @@ -273,7 +273,7 @@ protected: // bool MatchCaptureSizeRequest(ACameraManager *cameraManager, const char *selectedCameraId, unsigned int width, unsigned int height, uint32_t cameraOrientation_, bool TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, const std::string& path, std::vector& osds, std::shared_ptr powerCtrlPtr); - bool PostProcessPhoto(const PHOTO_INFO& photoInfo, const vector& osds, const std::string& path, const std::string& cameraInfo, cv::Mat& mat); + bool PostProcessPhoto(const PHOTO_INFO& photoInfo, const vector& osds, const std::string& path, const std::string& cameraInfo, cv::Mat mat); inline bool TakePhotoCb(int res, const IDevice::PHOTO_INFO& photoInfo, const string& path, time_t photoTime, const std::vector& objects) const { if (m_listener != NULL) @@ -318,7 +318,7 @@ protected: void QueryPowerInfo(std::map& powerInfo); std::string QueryCpuTemperature(); - bool OnImageReady(cv::Mat& mat); + bool OnImageReady(cv::Mat mat); bool onOneCapture(std::shared_ptr characteristics, std::shared_ptr results, uint32_t ldr, uint32_t duration, cv::Mat rgb); bool onBurstCapture(std::shared_ptr characteristics, std::vector >& results, uint32_t ldr, uint32_t duration, std::vector >& frames); bool onBurstCapture(std::shared_ptr characteristics, std::vector >& results, uint32_t ldr, uint32_t duration, std::vector >& frames); diff --git a/app/src/main/cpp/camera2/ndkcamera.cpp b/app/src/main/cpp/camera2/ndkcamera.cpp index f2ca1508..9cf6950d 100644 --- a/app/src/main/cpp/camera2/ndkcamera.cpp +++ b/app/src/main/cpp/camera2/ndkcamera.cpp @@ -1376,7 +1376,7 @@ void NdkCamera::onDisconnected(ACameraDevice* device) { } -bool NdkCamera::on_image(cv::Mat& rgb) +bool NdkCamera::on_image(cv::Mat rgb) { return false; } diff --git a/app/src/main/cpp/camera2/ndkcamera.h b/app/src/main/cpp/camera2/ndkcamera.h index d8e8bdf0..72b3a77f 100644 --- a/app/src/main/cpp/camera2/ndkcamera.h +++ b/app/src/main/cpp/camera2/ndkcamera.h @@ -165,7 +165,7 @@ public: void DestroySession(); - virtual bool on_image(cv::Mat& rgb); + virtual bool on_image(cv::Mat rgb); virtual void on_error(const std::string& msg); virtual void on_image(const unsigned char* nv21, int nv21_width, int nv21_height); virtual void onDisconnected(ACameraDevice* device);