From: <st...@us...> - 2009-04-18 12:31:25
|
Revision: 5721 http://octave.svn.sourceforge.net/octave/?rev=5721&view=rev Author: stegu Date: 2009-04-18 12:31:06 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Documentation typo Modified Paths: -------------- trunk/octave-forge/main/image/src/__bwdist.cc Modified: trunk/octave-forge/main/image/src/__bwdist.cc =================================================================== --- trunk/octave-forge/main/image/src/__bwdist.cc 2009-04-18 12:20:45 UTC (rev 5720) +++ trunk/octave-forge/main/image/src/__bwdist.cc 2009-04-18 12:31:06 UTC (rev 5721) @@ -88,8 +88,8 @@ \n\ If a second output argument is given, the linear index for the\n\ closest object pixel is returned for each pixel. (For object\n\ -pixels, the index points to the pixel itself.) The return value C\n\ -is a matrix the same size as @var{bw}.\n\n\ +pixels, the index points to the pixel itself.) The return value\n\ +@var{C} is a matrix the same size as @var{bw}.\n\n\ @end deftypefn") { const int nargin = args.length(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <st...@us...> - 2009-04-18 15:26:25
|
Revision: 5722 http://octave.svn.sourceforge.net/octave/?rev=5722&view=rev Author: stegu Date: 2009-04-18 15:26:15 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Stupid, fatal typo corrected Modified Paths: -------------- trunk/octave-forge/main/image/src/__bwdist.cc Modified: trunk/octave-forge/main/image/src/__bwdist.cc =================================================================== --- trunk/octave-forge/main/image/src/__bwdist.cc 2009-04-18 12:31:06 UTC (rev 5721) +++ trunk/octave-forge/main/image/src/__bwdist.cc 2009-04-18 15:26:15 UTC (rev 5722) @@ -1,4 +1,4 @@ -// bwdist.cc - OCT file, implements the BWDIST function +// __bwdist.cc - OCT file, implements the BWDIST function // Depends on "edtfunc.c" for the actual computations /* @@ -15,8 +15,7 @@ for more details. You should have received a copy of the GNU General Public License -along with Octave; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. +along with this file. If not, see <http://www.gnu.org/licenses/>. */ @@ -63,9 +62,9 @@ } /* end extern "C" */ #endif -DEFUN_DLD (bwdist, args, nargout, +DEFUN_DLD ( __bwdist, args, nargout, "-*- texinfo -*-\n\ -@deftypefn {Function File} {@var{D} =} bwdist(@var{bw})\n\ +@deftypefn {Function File} {@var{D} =} __bwdist(@var{bw})\n\ Computes the distance transform of the image @var{bw}.\n\ @var{bw} should be a binary 2D array, either a Boolean array or a\n\ numeric array containing only the values 0 and 1.\n\ @@ -76,7 +75,7 @@ metric) to the closest object pixel. For each object pixel the\n\ return value is 0.\n\ \n\ -@deftypefnx{Function File} {@var{D} =} bwdist(@var{bw}, @var{method})\n\ +@deftypefnx{Function File} {@var{D} =} __bwdist(@var{bw}, @var{method})\n\ \n\ @var{method} is a string to choose the distance metric. Currently\n\ available metrics are 'euclidean', 'chessboard', 'cityblock' and\n\ @@ -84,7 +83,7 @@ to any string starting with 'e', 'ch', 'ci' and 'q', respectively.\n\ If @var{method} is not specified, 'euclidean' is the default.\n\ \n\ -@deftypefnx {Function File} {[@var{D},@var{C}] =} bwdist(@var{bw}, @var{method})\n\ +@deftypefnx {Function File} {[@var{D},@var{C}] =} __bwdist(@var{bw}, @var{method})\n\ \n\ If a second output argument is given, the linear index for the\n\ closest object pixel is returned for each pixel. (For object\n\ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2012-09-18 18:44:02
|
Revision: 11048 http://octave.svn.sourceforge.net/octave/?rev=11048&view=rev Author: jordigh Date: 2012-09-18 18:43:56 +0000 (Tue, 18 Sep 2012) Log Message: ----------- whitespace fix Modified Paths: -------------- trunk/octave-forge/main/image/src/__bwdist.cc Modified: trunk/octave-forge/main/image/src/__bwdist.cc =================================================================== --- trunk/octave-forge/main/image/src/__bwdist.cc 2012-09-18 15:23:21 UTC (rev 11047) +++ trunk/octave-forge/main/image/src/__bwdist.cc 2012-09-18 18:43:56 UTC (rev 11048) @@ -90,7 +90,7 @@ { const int nargin = args.length(); octave_value_list retval; - + /* Check for proper number of input and output arguments */ if ((nargin < 1) || (nargin>2)) { error ("bwdist accepts only one or two input parameters."); @@ -119,13 +119,13 @@ charMatrix method = args(1).char_matrix_value(); if(method(0) == 'e') caseMethod = 0; // Euclidean; else if (method(0) == 'c') { - if(method(1) == 'h') caseMethod = 1; // chessboard - else if(method(1) == 'i') caseMethod = 2; // cityblock + if(method(1) == 'h') caseMethod = 1; // chessboard + else if(method(1) == 'i') caseMethod = 2; // cityblock } else if(method(0) == 'q') caseMethod = 3; // quasi-Euclidean else { - warning ("unknown metric, using 'euclidean'"); - caseMethod = 0; + warning ("unknown metric, using 'euclidean'"); + caseMethod = 0; } } @@ -141,46 +141,46 @@ switch(caseMethod) { case 1: - chessboard(bw, rows, cols, xdist, ydist); - for(int i=0; i<rows*cols; i++) { - D(i) = DIST_CHESSBOARD(xdist[i], ydist[i]); - } - break; + chessboard(bw, rows, cols, xdist, ydist); + for(int i=0; i<rows*cols; i++) { + D(i) = DIST_CHESSBOARD(xdist[i], ydist[i]); + } + break; case 2: - cityblock(bw, rows, cols, xdist, ydist); - for(int i=0; i<rows*cols; i++) { - D(i) = DIST_CITYBLOCK(xdist[i], ydist[i]); - } - break; + cityblock(bw, rows, cols, xdist, ydist); + for(int i=0; i<rows*cols; i++) { + D(i) = DIST_CITYBLOCK(xdist[i], ydist[i]); + } + break; case 3: - quasi_euclidean(bw, rows, cols, xdist, ydist); - for(int i=0; i<rows*cols; i++) { - D(i) = DIST_QUASI_EUCLIDEAN(xdist[i], ydist[i]); - } - break; + quasi_euclidean(bw, rows, cols, xdist, ydist); + for(int i=0; i<rows*cols; i++) { + D(i) = DIST_QUASI_EUCLIDEAN(xdist[i], ydist[i]); + } + break; case 0: default: - euclidean(bw, rows, cols, xdist, ydist); - /* Remember sqrt() for the final output */ - for(int i=0; i<rows*cols; i++) { - D(i) = sqrt((double)DIST_EUCLIDEAN(xdist[i], ydist[i])); - } - break; + euclidean(bw, rows, cols, xdist, ydist); + /* Remember sqrt() for the final output */ + for(int i=0; i<rows*cols; i++) { + D(i) = sqrt((double)DIST_EUCLIDEAN(xdist[i], ydist[i])); + } + break; } retval(0) = D; if(nargout > 1) { - /* Create a second output array */ - Matrix C (rows, cols); - /* Compute optional 'index to closest object pixel' */ - for(int i=0; i<rows*cols; i++) { - C (i) = i+1 - xdist[i] - ydist[i]*rows; - } - retval(1) = C; + /* Create a second output array */ + Matrix C (rows, cols); + /* Compute optional 'index to closest object pixel' */ + for(int i=0; i<rows*cols; i++) { + C (i) = i+1 - xdist[i] - ydist[i]*rows; + } + retval(1) = C; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |