Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
lens_calibrate/find_N8_lines.h
Go to the documentation of this file.00001 /* find_N8_lines.h 00002 00003 find straightish non-crossing lines in an edge map, 00004 using 8-neighborhood operations. (Points on the edges 00005 of the image cannot be line points). 00006 00007 edgeMap2linePts() marks line point in an otherwise zero 00008 BImage; end points = 1, interior points = 2. A threshold 00009 on the edge map defines valid candidates. Returns the 00010 number of segments, 0 if edge and line image sizes differ. 00011 00012 linePts2lineList() converts a linePts image to a list of 00013 all lines that meet some selection criteria. The line list 00014 is a vector of pointers to N8_line objects created here; 00015 the vector itself is passed in by caller. 00016 Returns the number of lines added 00017 */ 00018 00019 /*************************************************************************** 00020 * Copyright (C) 2009 Thomas K Sharpless * 00021 * tksharpless@gmail.com * 00022 * * 00023 * This program is free software; you can redistribute it and/or modify * 00024 * it under the terms of the GNU General Public License as published by * 00025 * the Free Software Foundation; either version 2 of the License, or * 00026 * (at your option) any later version. * 00027 * * 00028 * This program is distributed in the hope that it will be useful, * 00029 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00030 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00031 * GNU General Public License for more details. * 00032 * * 00033 * You should have received a copy of the GNU General Public License * 00034 * along with this program; if not, write to the * 00035 * Free Software Foundation, Inc., * 00036 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00037 ***************************************************************************/ 00038 00039 #include <vector> 00040 #include <vigra/stdimage.hxx> 00041 #include <vigra/basicimage.hxx> 00042 #include <vigra/pixelneighborhood.hxx> 00043 00044 // colors used in lines image 00045 #define N8_bg 255 00046 #define N8_end 1 00047 #define N8_mid 96 00048 00049 int 00050 edgeMap2linePts( vigra::BImage & edge, bool save_images ); 00051 00052 int 00053 linePts2lineList( vigra::BImage & img, 00054 int minsize, 00055 double minCtoA, // chord/arc threshold 00056 std::vector<std::vector<vigra::Point2D> > & lines 00057 ); 00058 00059
1.3.9.1