26 #include <fvfilters/segment_color.h>
28 #include <fvmodels/color/colormodel.h>
29 #include <fvutils/color/yuv.h>
32 namespace firevision {
49 FilterColorSegmentation::FilterColorSegmentation(
ColorModel *cm)
50 :
Filter(
"FilterColorSegmentation")
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)
81 unsigned char *lyp = yp;
82 unsigned char *lup = up;
83 unsigned char *lvp = vp;
84 unsigned char *ldyp = dyp;
85 unsigned char *ldup = dup;
86 unsigned char *ldvp = dvp;
91 for (h = 0; (h <
src_roi[0]->
height) && (h < dst_roi->height); ++h) {
92 for (w = 0; (w <
src_roi[0]->
width) && (w < dst_roi->width); w += 2) {