MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / verifyBlackColorPattern

Function verifyBlackColorPattern

sources/lut-calibrator/BoardUtils.cpp:113–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 }
112
113 bool verifyBlackColorPattern(const Image<ColorRgb>& yuvImage, bool isFirstWhite, CapturedColor& black)
114 {
115 try
116 {
117 for (int x = 0; x < SCREEN_BLOCKS_X; x++)
118 for (int y = 0; y < SCREEN_BLOCKS_Y; y++)
119 if ((x + isFirstWhite + y) % 2 == 0)
120 {
121 auto test = readBlock(yuvImage, int2(x, y));
122 if (test.Y() > black.Y() + SCREEN_MAX_CRC_BRIGHTNESS_ERROR)
123 return false;
124 }
125 }
126 catch (std::exception& ex)
127 {
128 // too much noice or too low resolution
129 return false;
130 }
131
132 return true;
133 }
134
135 int readCrc(const Image<ColorRgb>& yuvImage, int line, CapturedColor& white)
136 {

Callers 1

parseBoardFunction · 0.85

Calls 2

readBlockFunction · 0.85
int2Class · 0.85

Tested by

no test coverage detected