Skip to content

Commit ccc926a

Browse files
committed
Test Color bars
1 parent 372079d commit ccc926a

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

examples/zed_oc_video_reg_log.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,14 @@ int main(int argc, char *argv[])
9191

9292
if (f_count%10==0)
9393
{
94+
/* cap.
9495
cap.saveAllISPRegisters("ov580_lr_"+std::to_string(f_count)+".csv");
9596
cap.saveAllSensorsRegisters("ov4689_lr_"+std::to_string(f_count)+".csv");
96-
std::cout<<" Save Data for f_count "<<f_count<<std::endl;
97+
std::cout<<" Save Data for f_count "<<f_count<<std::endl;*/
98+
if (f_count%20==0)
99+
cap.setColorBars(0,true);
100+
else
101+
cap.setColorBars(0,false);
97102
}
98103

99104

include/videocapture.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,12 @@ class SL_OC_EXPORT VideoCapture
349349
bool enableAecAgcSensLogging(bool enable, int frame_skip=10);
350350

351351

352+
353+
/*!
354+
* \brief Utils fct to set Color Bars on Image
355+
*/
356+
void setColorBars(int side, bool c);
357+
352358
/*!
353359
* \brief Save all ISP camera registers into a file
354360
* \param filename csv filename

src/videocapture.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,6 +1982,18 @@ bool VideoCapture::enableAecAgcSensLogging(bool enable, int frame_skip/*=10*/)
19821982
return true;
19831983
}
19841984

1985+
void VideoCapture::setColorBars(int side, bool c)
1986+
{
1987+
1988+
1989+
unsigned long long ulAddr2 = 0x80181080;
1990+
if (side==1)
1991+
ulAddr2 = 0x80181880;
1992+
1993+
unsigned char ulValue2 =c?128:0;
1994+
ll_write_system_register(ulAddr2,ulValue2);
1995+
}
1996+
19851997

19861998
void VideoCapture::saveAllISPRegisters(std::string filename)
19871999
{

0 commit comments

Comments
 (0)