@ -2272,7 +2272,7 @@ bool CPhoneDevice::onOneCapture(std::shared_ptr<ACameraMetadata> characteristics
cameraInfo = str ;
cameraInfo = str ;
}
}
# ifdef OUTPUT_ CAMERA_ DBG_INFO
# ifdef OUTPUT_ DBG_INFO
#if 0
#if 0
bool shouldRetry = false ;
bool shouldRetry = false ;
if ( ldr ! = ~ 0 )
if ( ldr ! = ~ 0 )
@ -2309,7 +2309,7 @@ bool CPhoneDevice::onOneCapture(std::shared_ptr<ACameraMetadata> characteristics
}
}
}
}
# endif // 0
# endif // 0
# endif // OUTPUT_ CAMERA_ DBG_INFO
# endif // OUTPUT_ DBG_INFO
// Notify to take next photo
// Notify to take next photo
XYLOG ( XYLOG_SEVERITY_INFO , " TP: Notofy to Take Next CUR Info: CH=%u PR=%u PHOTOID=%u " , ( uint32_t ) photoInfo . channel , ( uint32_t ) photoInfo . preset , ( uint32_t ) photoInfo . photoId ) ;
XYLOG ( XYLOG_SEVERITY_INFO , " TP: Notofy to Take Next CUR Info: CH=%u PR=%u PHOTOID=%u " , ( uint32_t ) photoInfo . channel , ( uint32_t ) photoInfo . preset , ( uint32_t ) photoInfo . photoId ) ;
@ -2414,7 +2414,7 @@ bool CPhoneDevice::onBurstCapture(std::shared_ptr<ACameraMetadata> characteristi
}
}
}
}
# ifdef OUTPUT_ CAMERA_ DBG_INFO
# ifdef OUTPUT_ DBG_INFO
#if 0
#if 0
bool shouldRetry = false ;
bool shouldRetry = false ;
if ( ldr ! = ~ 0 )
if ( ldr ! = ~ 0 )
@ -2451,7 +2451,7 @@ bool CPhoneDevice::onBurstCapture(std::shared_ptr<ACameraMetadata> characteristi
}
}
}
}
# endif // 0
# endif // 0
# endif // OUTPUT_ CAMERA_ DBG_INFO
# endif // OUTPUT_ DBG_INFO
// Notify to take next photo
// Notify to take next photo
pThis - > TakePhotoCb ( 1 , photoInfo , " " , takingTime ) ;
pThis - > TakePhotoCb ( 1 , photoInfo , " " , takingTime ) ;
@ -2911,7 +2911,7 @@ bool CPhoneDevice::onBurstCapture(std::shared_ptr<ACameraMetadata> characteristi
}
}
}
}
# ifdef OUTPUT_ CAMERA_ DBG_INFO
# ifdef OUTPUT_ DBG_INFO
#if 0
#if 0
bool shouldRetry = false ;
bool shouldRetry = false ;
if ( ldr ! = ~ 0 )
if ( ldr ! = ~ 0 )
@ -2948,7 +2948,7 @@ bool CPhoneDevice::onBurstCapture(std::shared_ptr<ACameraMetadata> characteristi
}
}
}
}
# endif // 0
# endif // 0
# endif // OUTPUT_ CAMERA_ DBG_INFO
# endif // OUTPUT_ DBG_INFO
// Notify to take next photo
// Notify to take next photo
pThis - > TakePhotoCb ( 1 , photoInfo , " " , takingTime ) ;
pThis - > TakePhotoCb ( 1 , photoInfo , " " , takingTime ) ;
@ -3189,7 +3189,7 @@ bool CPhoneDevice::OnImageReady(cv::Mat mat)
pt . x = it - > x + it - > w - textSize . width ;
pt . x = it - > x + it - > w - textSize . width ;
}
}
# ifdef OUTPUT_ CAMERA_ DBG_INFO
# ifdef OUTPUT_ DBG_INFO
char buf [ 128 ] ;
char buf [ 128 ] ;
snprintf ( buf , sizeof ( buf ) , " AI: %d=%s (%f,%f)-(%f,%f) Text:(%d,%d)-(%d,%d) " ,
snprintf ( buf , sizeof ( buf ) , " AI: %d=%s (%f,%f)-(%f,%f) Text:(%d,%d)-(%d,%d) " ,
it - > label , item . name . c_str ( ) , it - > x , it - > y , it - > w , it - > h , pt . x , pt . y , textSize . width , textSize . height ) ;
it - > label , item . name . c_str ( ) , it - > x , it - > y , it - > w , it - > h , pt . x , pt . y , textSize . width , textSize . height ) ;
@ -3206,7 +3206,7 @@ bool CPhoneDevice::OnImageReady(cv::Mat mat)
XYLOG ( XYLOG_SEVERITY_WARNING , " Channel AI Disabled " ) ;
XYLOG ( XYLOG_SEVERITY_WARNING , " Channel AI Disabled " ) ;
}
}
// #ifdef OUTPUT_ CAMERA_ DBG_INFO
// #ifdef OUTPUT_ DBG_INFO
if ( mCamera ! = NULL )
if ( mCamera ! = NULL )
{
{
@ -3242,7 +3242,7 @@ bool CPhoneDevice::OnImageReady(cv::Mat mat)
// DrawOutlineText(ft2, mat, str, cv::Point(0, mat.rows - fs - 20 * ratio), fs, scalarWhite, 1);
// DrawOutlineText(ft2, mat, str, cv::Point(0, mat.rows - fs - 20 * ratio), fs, scalarWhite, 1);
}
}
}
}
// #endif // OUTPUT_ CAMERA_ DBG_INFO
// #endif // OUTPUT_ DBG_INFO
for ( vector < OSD_INFO > : : const_iterator it = mOsds . cbegin ( ) ; it ! = mOsds . cend ( ) ; + + it )
for ( vector < OSD_INFO > : : const_iterator it = mOsds . cbegin ( ) ; it ! = mOsds . cend ( ) ; + + it )
{
{
@ -3294,7 +3294,7 @@ bool CPhoneDevice::OnImageReady(cv::Mat mat)
bool res = false ;
bool res = false ;
std : : string fullPath = endsWith ( mPath , " .jpg " ) ? mPath : ( mPath + CTerminal : : BuildPhotoFileName ( mPhotoInfo ) ) ;
std : : string fullPath = endsWith ( mPath , " .jpg " ) ? mPath : ( mPath + CTerminal : : BuildPhotoFileName ( mPhotoInfo ) ) ;
# ifdef OUTPUT_ CAMERA_ DBG_INFO
# ifdef OUTPUT_ DBG_INFO
bool shouldRetry = false ;
bool shouldRetry = false ;
#if 0
#if 0
@ -3334,7 +3334,7 @@ bool CPhoneDevice::OnImageReady(cv::Mat mat)
}
}
# endif
# endif
# endif // OUTPUT_ CAMERA_ DBG_INFO
# endif // OUTPUT_ DBG_INFO
if ( ! std : : filesystem : : exists ( std : : filesystem : : path ( fullPath ) ) | | getFileSize ( fullPath ) = = 0 )
if ( ! std : : filesystem : : exists ( std : : filesystem : : path ( fullPath ) ) | | getFileSize ( fullPath ) = = 0 )
{
{
@ -3347,7 +3347,7 @@ bool CPhoneDevice::OnImageReady(cv::Mat mat)
{
{
XYLOG ( XYLOG_SEVERITY_INFO , " Succeeded to write photo: %s " , fullPath . c_str ( ) ) ;
XYLOG ( XYLOG_SEVERITY_INFO , " Succeeded to write photo: %s " , fullPath . c_str ( ) ) ;
}
}
# ifdef OUTPUT_ CAMERA_ DBG_INFO
# ifdef OUTPUT_ DBG_INFO
if ( shouldRetry )
if ( shouldRetry )
{
{
TakePhotoCb ( 0 , mPhotoInfo , fullPath , takingTime , objs ) ;
TakePhotoCb ( 0 , mPhotoInfo , fullPath , takingTime , objs ) ;
@ -3479,7 +3479,7 @@ bool CPhoneDevice::PostProcessPhoto(const PHOTO_INFO& photoInfo, const vector<ID
pt . x = it - > x + it - > w - textSize . width ;
pt . x = it - > x + it - > w - textSize . width ;
}
}
# ifdef OUTPUT_ CAMERA_ DBG_INFO
# ifdef OUTPUT_ DBG_INFO
char buf [ 128 ] ;
char buf [ 128 ] ;
snprintf ( buf , sizeof ( buf ) , " AI: %d=%s (%f,%f)-(%f,%f) Text:(%d,%d)-(%d,%d) " ,
snprintf ( buf , sizeof ( buf ) , " AI: %d=%s (%f,%f)-(%f,%f) Text:(%d,%d)-(%d,%d) " ,
it - > label , item . name . c_str ( ) , it - > x , it - > y , it - > w , it - > h , pt . x , pt . y , textSize . width , textSize . height ) ;
it - > label , item . name . c_str ( ) , it - > x , it - > y , it - > w , it - > h , pt . x , pt . y , textSize . width , textSize . height ) ;
@ -3496,7 +3496,7 @@ bool CPhoneDevice::PostProcessPhoto(const PHOTO_INFO& photoInfo, const vector<ID
XYLOG ( XYLOG_SEVERITY_WARNING , " Channel AI Disabled " ) ;
XYLOG ( XYLOG_SEVERITY_WARNING , " Channel AI Disabled " ) ;
}
}
// #ifdef OUTPUT_ CAMERA_ DBG_INFO
// #ifdef OUTPUT_ DBG_INFO
if ( ! cameraInfo . empty ( ) )
if ( ! cameraInfo . empty ( ) )
{
{
@ -3533,7 +3533,7 @@ bool CPhoneDevice::PostProcessPhoto(const PHOTO_INFO& photoInfo, const vector<ID
// DrawOutlineText(ft2, mat, str, cv::Point(0, mat.rows - fs - 20 * ratio), fs, scalarWhite, 1);
// DrawOutlineText(ft2, mat, str, cv::Point(0, mat.rows - fs - 20 * ratio), fs, scalarWhite, 1);
}
}
}
}
// #endif // OUTPUT_ CAMERA_ DBG_INFO
// #endif // OUTPUT_ DBG_INFO
for ( vector < OSD_INFO > : : const_iterator it = osds . cbegin ( ) ; it ! = osds . cend ( ) ; + + it )
for ( vector < OSD_INFO > : : const_iterator it = osds . cbegin ( ) ; it ! = osds . cend ( ) ; + + it )
{
{