24 #include <fvclassifiers/shrinker.h>
25 #include <fvutils/base/roi.h>
26 #include <fvutils/color/colorspaces.h>
30 namespace firevision {
66 src = yuv422planar_buffer;
85 if (roi->
width <= 100) {
91 unsigned char * line_startTmp = bufferTmp;
96 bool pixelFound =
false;
97 for (x = 0; !pixelFound && (x < roi->
width / 2); ++x) {
98 for (y = 0; y < roi->
height / 2; ++y) {
99 if (*bufferTmp > 230) {
107 bufferTmp = line_startTmp;
111 line_startTmp = bufferTmp;
115 for (y = 0; !pixelFound && (y < roi->
height / 2); ++y) {
116 for (x = 0; x < roi->
width; ++x) {
117 if (*bufferTmp > 230) {
138 bufferTmp = line_startTmp;
142 line_startTmp = bufferTmp;
145 if ((leftmostPixel.
x >= topmostPixel.
x) || (topmostPixel.
y >= leftmostPixel.
y)
146 || (2 * (topmostPixel.
x - leftmostPixel.
x) >= roi->
width)
147 || (2 * (leftmostPixel.
y - topmostPixel.
y) >= roi->
height)) {
155 roi->
height = 2 * (leftmostPixel.
y - topmostPixel.
y);