template<class T> static void draw_points(Img<T> &img, const icl64f &value, std::vector<Point32f> &approx){ T *d = img.getData(0); int lineStep = img.getLineStep(); for(std::vector<Point32f>::iterator it = approx.begin(); it != approx.end(); ++it){ *(d + (int)(it->y) * lineStep + (int)(it->x)) = value; } }