26 #include <fvmodels/color/colormodel.h> 27 #include <fvfilters/segment.h> 29 #include <fvutils/color/yuv.h> 59 register unsigned int h = 0;
60 register unsigned int w = 0;
65 register unsigned char *up = YUV422_PLANAR_U_PLANE(
src[0],
src_roi[0]->image_width,
src_roi[0]->image_height)
68 register unsigned char *vp = YUV422_PLANAR_V_PLANE(
src[0],
src_roi[0]->image_width,
src_roi[0]->image_height)
75 unsigned char *lyp = yp;
76 unsigned char *lup = up;
77 unsigned char *lvp = vp;
78 unsigned char *ldyp = dyp;
80 for (h = 0; (h <
src_roi[0]->
height) && (h < dst_roi->height); ++h) {
81 for (w = 0; (w <
src_roi[0]->
width) && (w < dst_roi->width); w += 2) {
82 if ( (cm->
determine(*yp++, *up, *vp) == what) ) {
87 if ( (cm->
determine(*yp++, *up++, *vp++) == what) ) {
fawkes::upoint_t start
ROI start.
unsigned int y
y coordinate
unsigned int x
x coordinate
unsigned int width
ROI width.
unsigned char ** src
Source buffers, dynamically allocated by Filter ctor.
ROI ** src_roi
Source ROIs, dynamically allocated by Filter ctor.
FilterSegment(ColorModel *cm, color_t what)
Constructor.
virtual void apply()
Apply the filter.
unsigned int height
ROI height.
unsigned int line_step
line step
unsigned char * dst
Destination buffer.
unsigned int pixel_step
pixel step
ROI * dst_roi
Destination ROI.
virtual color_t determine(unsigned int y, unsigned int u, unsigned int v) const =0
Determine classification of YUV pixel.