/* * naive_steerer.cpp * * Copyright 2012 Florian Jung * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 3 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ #include "naive_steerer.h" #include "util.h" using namespace std; NaiveSteerer::NaiveSteerer(int chx, int chy) { set_crosshair(chx,chy); } void NaiveSteerer::set_crosshair(int chx, int chy) { crosshair_x=chx; crosshair_y=chy; } void NaiveSteerer::process_image(const Mat& img) { int left_sum=0, right_sum=0; for (int row = 0; row(row); for (int col=0; col