This list is closed, nobody may subscribe to it.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(10) |
Aug
(5) |
Sep
(3) |
Oct
(41) |
Nov
(41) |
Dec
(33) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(75) |
Feb
(10) |
Mar
(170) |
Apr
(174) |
May
(66) |
Jun
(11) |
Jul
(10) |
Aug
(44) |
Sep
(73) |
Oct
(28) |
Nov
(139) |
Dec
(52) |
2003 |
Jan
(35) |
Feb
(93) |
Mar
(62) |
Apr
(10) |
May
(55) |
Jun
(70) |
Jul
(37) |
Aug
(16) |
Sep
(56) |
Oct
(31) |
Nov
(57) |
Dec
(83) |
2004 |
Jan
(85) |
Feb
(67) |
Mar
(27) |
Apr
(37) |
May
(75) |
Jun
(85) |
Jul
(160) |
Aug
(68) |
Sep
(104) |
Oct
(25) |
Nov
(39) |
Dec
(23) |
2005 |
Jan
(10) |
Feb
(45) |
Mar
(43) |
Apr
(19) |
May
(108) |
Jun
(31) |
Jul
(41) |
Aug
(23) |
Sep
(65) |
Oct
(58) |
Nov
(44) |
Dec
(54) |
2006 |
Jan
(96) |
Feb
(27) |
Mar
(69) |
Apr
(59) |
May
(67) |
Jun
(35) |
Jul
(13) |
Aug
(461) |
Sep
(160) |
Oct
(399) |
Nov
(32) |
Dec
(72) |
2007 |
Jan
(316) |
Feb
(305) |
Mar
(318) |
Apr
(54) |
May
(194) |
Jun
(173) |
Jul
(282) |
Aug
(91) |
Sep
(227) |
Oct
(365) |
Nov
(168) |
Dec
(18) |
2008 |
Jan
(71) |
Feb
(111) |
Mar
(155) |
Apr
(173) |
May
(70) |
Jun
(67) |
Jul
(55) |
Aug
(83) |
Sep
(32) |
Oct
(68) |
Nov
(80) |
Dec
(29) |
2009 |
Jan
(46) |
Feb
(18) |
Mar
(95) |
Apr
(76) |
May
(140) |
Jun
(98) |
Jul
(84) |
Aug
(123) |
Sep
(94) |
Oct
(131) |
Nov
(142) |
Dec
(125) |
2010 |
Jan
(128) |
Feb
(158) |
Mar
(172) |
Apr
(134) |
May
(94) |
Jun
(84) |
Jul
(32) |
Aug
(127) |
Sep
(167) |
Oct
(109) |
Nov
(69) |
Dec
(78) |
2011 |
Jan
(39) |
Feb
(58) |
Mar
(52) |
Apr
(47) |
May
(56) |
Jun
(76) |
Jul
(55) |
Aug
(54) |
Sep
(165) |
Oct
(255) |
Nov
(328) |
Dec
(263) |
2012 |
Jan
(82) |
Feb
(147) |
Mar
(400) |
Apr
(216) |
May
(209) |
Jun
(160) |
Jul
(86) |
Aug
(141) |
Sep
(156) |
Oct
(6) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(2) |
2016 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(4) |
Jun
(8) |
Jul
(2) |
Aug
(5) |
Sep
(9) |
Oct
|
Nov
|
Dec
|
From: <car...@us...> - 2012-04-16 12:50:01
|
Revision: 10248 http://octave.svn.sourceforge.net/octave/?rev=10248&view=rev Author: carandraug Date: 2012-04-16 12:49:47 +0000 (Mon, 16 Apr 2012) Log Message: ----------- maint: update license to GPLv3 and mention non GPL files Modified Paths: -------------- trunk/octave-forge/main/image/COPYING trunk/octave-forge/main/image/inst/blkproc.m trunk/octave-forge/main/image/inst/blockproc.m trunk/octave-forge/main/image/inst/bmpwrite.m trunk/octave-forge/main/image/inst/bwarea.m trunk/octave-forge/main/image/inst/bwborder.m trunk/octave-forge/main/image/inst/bwboundaries.m trunk/octave-forge/main/image/inst/bwconncomp.m trunk/octave-forge/main/image/inst/bwdist.m trunk/octave-forge/main/image/inst/bweuler.m trunk/octave-forge/main/image/inst/bwhitmiss.m trunk/octave-forge/main/image/inst/bwperim.m trunk/octave-forge/main/image/inst/bwselect.m trunk/octave-forge/main/image/inst/colfilt.m trunk/octave-forge/main/image/inst/conndef.m trunk/octave-forge/main/image/inst/corr2.m trunk/octave-forge/main/image/inst/edge.m trunk/octave-forge/main/image/inst/entropy.m trunk/octave-forge/main/image/inst/entropyfilt.m trunk/octave-forge/main/image/inst/fchcode.m trunk/octave-forge/main/image/inst/fspecial.m trunk/octave-forge/main/image/inst/getrangefromclass.m trunk/octave-forge/main/image/inst/grayslice.m trunk/octave-forge/main/image/inst/graythresh.m trunk/octave-forge/main/image/inst/histeq.m trunk/octave-forge/main/image/inst/hough_circle.m trunk/octave-forge/main/image/inst/houghtf.m trunk/octave-forge/main/image/inst/imabsdiff.m trunk/octave-forge/main/image/inst/imadd.m trunk/octave-forge/main/image/inst/imbothat.m trunk/octave-forge/main/image/inst/imclose.m trunk/octave-forge/main/image/inst/imcomplement.m trunk/octave-forge/main/image/inst/imdilate.m trunk/octave-forge/main/image/inst/imdivide.m trunk/octave-forge/main/image/inst/imerode.m trunk/octave-forge/main/image/inst/imfilter.m trunk/octave-forge/main/image/inst/imhist.m trunk/octave-forge/main/image/inst/imlincomb.m trunk/octave-forge/main/image/inst/immultiply.m trunk/octave-forge/main/image/inst/imopen.m trunk/octave-forge/main/image/inst/impad.m trunk/octave-forge/main/image/inst/imperspectivewarp.m trunk/octave-forge/main/image/inst/imremap.m trunk/octave-forge/main/image/inst/imresize.m trunk/octave-forge/main/image/inst/imrotate.m trunk/octave-forge/main/image/inst/imrotate_Fourier.m trunk/octave-forge/main/image/inst/imshear.m trunk/octave-forge/main/image/inst/imsmooth.m trunk/octave-forge/main/image/inst/imsubtract.m trunk/octave-forge/main/image/inst/imtophat.m trunk/octave-forge/main/image/inst/imtranslate.m trunk/octave-forge/main/image/inst/iptcheckconn.m trunk/octave-forge/main/image/inst/iptcheckmap.m trunk/octave-forge/main/image/inst/iptchecknargin.m trunk/octave-forge/main/image/inst/iptcheckstrs.m trunk/octave-forge/main/image/inst/iptnum2ordinal.m trunk/octave-forge/main/image/inst/iradon.m trunk/octave-forge/main/image/inst/isbw.m trunk/octave-forge/main/image/inst/isgray.m trunk/octave-forge/main/image/inst/isind.m trunk/octave-forge/main/image/inst/isrgb.m trunk/octave-forge/main/image/inst/label2rgb.m trunk/octave-forge/main/image/inst/mat2gray.m trunk/octave-forge/main/image/inst/mean2.m trunk/octave-forge/main/image/inst/medfilt2.m trunk/octave-forge/main/image/inst/mmgradm.m trunk/octave-forge/main/image/inst/nlfilter.m trunk/octave-forge/main/image/inst/normxcorr2.m trunk/octave-forge/main/image/inst/ordfilt2.m trunk/octave-forge/main/image/inst/ordfiltn.m trunk/octave-forge/main/image/inst/padarray.m trunk/octave-forge/main/image/inst/phantom.m trunk/octave-forge/main/image/inst/poly2mask.m trunk/octave-forge/main/image/inst/qtdecomp.m trunk/octave-forge/main/image/inst/radon.m trunk/octave-forge/main/image/inst/rangefilt.m trunk/octave-forge/main/image/inst/readexif.m trunk/octave-forge/main/image/inst/regionprops.m trunk/octave-forge/main/image/inst/rgb2gray.m trunk/octave-forge/main/image/inst/rgb2ycbcr.m trunk/octave-forge/main/image/inst/rgbplot.m trunk/octave-forge/main/image/inst/rho_filter.m trunk/octave-forge/main/image/inst/std2.m trunk/octave-forge/main/image/inst/stdfilt.m trunk/octave-forge/main/image/inst/stretchlim.m trunk/octave-forge/main/image/inst/tiff_tag_read.m trunk/octave-forge/main/image/src/__bilateral__.cc trunk/octave-forge/main/image/src/__boundary__.cc trunk/octave-forge/main/image/src/__bwdist.cc trunk/octave-forge/main/image/src/__custom_gaussian_smoothing__.cc trunk/octave-forge/main/image/src/__spatial_filtering__.cc trunk/octave-forge/main/image/src/bwlabeln.cc trunk/octave-forge/main/image/src/edtfunc.c trunk/octave-forge/main/image/src/graycomatrix.cc trunk/octave-forge/main/image/src/hough_line.cc trunk/octave-forge/main/image/src/nonmax_supress.cc trunk/octave-forge/main/image/src/union-find.h++ Modified: trunk/octave-forge/main/image/COPYING =================================================================== --- trunk/octave-forge/main/image/COPYING 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/COPYING 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,337 +1 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - 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, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. +See individual files for licenses Modified: trunk/octave-forge/main/image/inst/blkproc.m =================================================================== --- trunk/octave-forge/main/image/inst/blkproc.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/blkproc.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,17 +1,17 @@ ## Copyright (C) 2004 Josep Mones i Teixidor ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{B} = } blkproc (@var{A}, [@var{m},@var{n}], @var{fun}) Modified: trunk/octave-forge/main/image/inst/blockproc.m =================================================================== --- trunk/octave-forge/main/image/inst/blockproc.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/blockproc.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,23 +1,23 @@ -## Copyright (C) 2004 Josep Mones i Teixidor +## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{B} = } blockproc (@var{A}, [@var{m},@var{n}], @var{fun}) -## @deftypefnx {Function File} {@var{B} = } blockproc (@var{A}, [@var{m},@var{n}], @var{fun}, ...) -## @deftypefnx {Function File} {@var{B} = } blockproc (@var{A}, [@var{m},@var{n}], [@var{mborder},@var{nborder}], @var{fun}, @var{...}) -## @deftypefnx {Function File} {@var{B} = } blockproc (@var{A}, 'indexed', ...) +## @deftypefnx {Function File} {@var{B} = } blockproc (@var{A}, [@var{m},@var{n}], @var{fun}, @dots{}) +## @deftypefnx {Function File} {@var{B} = } blockproc (@var{A}, [@var{m},@var{n}], [@var{mborder},@var{nborder}], @var{fun}, @dots{}) +## @deftypefnx {Function File} {@var{B} = } blockproc (@var{A}, 'indexed', @dots{}) ## Processes image in blocks using user-supplied function. ## ## @code{B=blockproc(A,[m,n],fun)} divides image @var{A} in @@ -27,10 +27,10 @@ ## at the bottom and right borders of the image. 0 is used as a padding ## value. ## -## @code{B=blockproc(A,[m,n],fun,...)} behaves as described above but +## @code{B=blockproc(A,[m,n],fun, @dots{})} behaves as described above but ## passes extra parameters to function @var{fun}. ## -## @code{B=blockproc(A,[m,n],[mborder,nborder],fun,...)} behaves as +## @code{B=blockproc(A,[m,n],[mborder,nborder],fun, @dots{})} behaves as ## described but uses blocks which overlap with neighbour blocks. ## Overlapping dimensions are @var{mborder} vertically and @var{nborder} ## horizontally. This doesn't change the number of blocks in an image @@ -38,7 +38,7 @@ ## border requires extra padding on all edges of the image. 0 is used as ## a padding value. ## -## @code{B=blockproc(A,'indexed',...)} assumes that @var{A} is an indexed +## @code{B=blockproc(A,'indexed', @dots{})} assumes that @var{A} is an indexed ## image, so it pads the image using proper value: 0 for uint8 and ## uint16 images and 1 for double images. Keep in mind that if 'indexed' ## is not specified padding is always done using 0. @@ -46,8 +46,6 @@ ## @seealso{colfilt,inline,bestblk} ## @end deftypefn -## Author: Josep Mones i Teixidor <jm...@pu...> - function B = blockproc(A, varargin) if(nargin<3) print_usage; @@ -167,38 +165,3 @@ %!assert(blockproc(uint8(eye(6)),'indexed',[1,2],[1,1],inline("sum(x(:))","x")),[2,1,0;3,2,0;2,3,1;1,3,2;0,2,3;0,1,2]); %!assert(blockproc(uint16(eye(6)),[1,2],[1,1],inline("sum(x(:))","x")),[2,1,0;3,2,0;2,3,1;1,3,2;0,2,3;0,1,2]); %!assert(blockproc(uint16(eye(6)),'indexed',[1,2],[1,1],inline("sum(x(:))","x")),[2,1,0;3,2,0;2,3,1;1,3,2;0,2,3;0,1,2]); - - -% -% $Log$ -% Revision 1.5 2007/03/23 16:14:36 adb014 -% Update the FSF address -% -% Revision 1.4 2007/01/04 23:44:22 hauberg -% Minor changes in help text -% -% Revision 1.3 2007/01/04 23:37:54 hauberg -% Minor changes in help text -% -% Revision 1.2 2006/10/08 21:41:04 adb014 -% check isnumeric for vector and 'function_handle' not 'function handle' in isa test -% -% Revision 1.1 2006/08/20 12:59:31 hauberg -% Changed the structure to match the package system -% -% Revision 1.5 2005/09/08 02:00:17 pkienzle -% [for Bill Denney] isstr -> ischar -% -% Revision 1.4 2004/11/15 16:04:20 pkienzle -% Fix tests for functions which return boolean matrices -% -% Revision 1.3 2004/09/03 17:49:37 jmones -% Improved uint8 and uint16 padding expections -% -% Revision 1.2 2004/09/03 13:40:13 jmones -% Check result has same class as function result, and improved fun param checking -% -% Revision 1.1 2004/08/15 19:27:46 jmones -% blockproc: block process an image using user-supplied function -% -% Modified: trunk/octave-forge/main/image/inst/bmpwrite.m =================================================================== --- trunk/octave-forge/main/image/inst/bmpwrite.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/bmpwrite.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,3 +1,6 @@ +## Author: Paul Kienzle <pki...@us...> +## This program is granted to the public domain. + ## -*- texinfo -*- ## @deftypefn {Function File} bmpwrite (@var{X}, @var{map}, @var{file}) ## Write the bitmap @var{X} into @var{file} (8-bit indexed uncompressed). @@ -7,10 +10,6 @@ ## @var{X} is an m x n x 3 array of R,G,B integer values in the range 0 to 255. ## @end deftypefn -## This code is in the public domain. -## Author: Paul Kienzle <pki...@us...> - - function bmpwrite(x,colormap_or_file,file) if nargin==2 bmpwrite_truecolor(x(:,:,1),x(:,:,2),x(:,:,3),colormap_or_file); Modified: trunk/octave-forge/main/image/inst/bwarea.m =================================================================== --- trunk/octave-forge/main/image/inst/bwarea.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/bwarea.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,17 +1,17 @@ -## Copyright (C) 2005 S\xF8ren Hauberg -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## 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, see <http://www.gnu.org/licenses/>. +## Copyright (C) 2005 S\xF8ren Hauberg <so...@ha...> +## +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## 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, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} @var{total}= bwarea(@var{bw}) @@ -24,12 +24,6 @@ ## and not the image object. ## @end deftypefn -## Author: S\xF8ren Hauberg <hauberg at gmail dot com> -## -## 2005-06-05 S\xF8ren Hauberg <hauberg at gmail dot com> -## * Initial revision - - function total = bwarea(bw) if (isgray(bw)) bw = (bw > 0); Modified: trunk/octave-forge/main/image/inst/bwborder.m =================================================================== --- trunk/octave-forge/main/image/inst/bwborder.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/bwborder.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,17 +1,17 @@ -## Copyright (C) 2000 Etienne Grossmann +## Copyright (C) 2000 Etienne Grossmann <et...@eg...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{b} = } bwborder (@var{im}) @@ -23,9 +23,6 @@ ## neighbor that is not set. ## @end deftypefn -## Author: Etienne Grossmann <et...@eg...> -## Last modified: January 2000 - function b = bwborder(im) [R,C]=size(im); Modified: trunk/octave-forge/main/image/inst/bwboundaries.m =================================================================== --- trunk/octave-forge/main/image/inst/bwboundaries.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/bwboundaries.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,18 +1,18 @@ -## Copyright (C) 2010 Soren Hauberg -## Modified December 2010 by Andrew Kelly, IPS Radio & Space Services +## Copyright (C) 2010 Soren Hauberg <so...@ha...> +## Copyright (C) Andrew Kelly, IPS Radio & Space Services ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{boundaries} = } bwboundaries(@var{BW}) Modified: trunk/octave-forge/main/image/inst/bwconncomp.m =================================================================== --- trunk/octave-forge/main/image/inst/bwconncomp.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/bwconncomp.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,17 +1,17 @@ ## Copyright (C) 2010 Soren Hauberg ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{cc} = } bwconncomp (@var{BW}) Modified: trunk/octave-forge/main/image/inst/bwdist.m =================================================================== --- trunk/octave-forge/main/image/inst/bwdist.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/bwdist.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,17 +1,17 @@ -## Copyright (C) 2006 Stefan Gustavson -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2, or (at your option) -## any later version. -## -## 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 file. If not, see <http://www.gnu.org/licenses/>. +## Copyright (C) 2006 Stefan Gustavson +## +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## 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, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{D} =} bwdist(@var{bw}) Modified: trunk/octave-forge/main/image/inst/bweuler.m =================================================================== --- trunk/octave-forge/main/image/inst/bweuler.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/bweuler.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,18 +1,18 @@ ## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## Copyright (C) 2011 Adrián del Pino <del...@gm...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{eul} = } bweuler (@var{BW}, @var{n}) @@ -34,8 +34,6 @@ ## @seealso{bwmorph, bwperim, qtgetblk} ## @end deftypefn -## Author: Josep Mones i Teixidor <jm...@pu...> - function eul = bweuler (BW, n = 8) if (nargin < 1 || nargin > 2) print_usage; @@ -97,19 +95,3 @@ %! assert(bweuler(A,4),2); %! assert(bweuler(A,8),1); %! assert(bweuler(A),1); - -% $Log$ -% Revision 1.3 2007/03/23 16:14:36 adb014 -% Update the FSF address -% -% Revision 1.2 2007/01/04 23:41:47 hauberg -% Minor changes in help text -% -% Revision 1.1 2006/08/20 12:59:31 hauberg -% Changed the structure to match the package system -% -% Revision 1.2 2005/07/03 01:10:19 pkienzle -% Try to correct for missing newline at the end of the file -% -% Revision 1.1 2004/08/15 19:33:20 jmones -% bweuler: Calculates the Euler number of a binary image Modified: trunk/octave-forge/main/image/inst/bwhitmiss.m =================================================================== --- trunk/octave-forge/main/image/inst/bwhitmiss.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/bwhitmiss.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,64 +1,67 @@ -## Copyright (C) 2008 Soren Hauberg -## -## This program is free software; you can redistribute it and/or -## modify it under the terms of the GNU General Public License -## as published by the Free Software Foundation; either version 2 -## of the License, or (at your option) any later version. -## -## 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. - -## -*- texinfo -*- -## @deftypefn {Function File} @var{bw2} = bwhitmiss (@var{bw1}, @var{se1}, @var{se1}) -## @deftypefnx{Function File} @var{bw2} = bwhitmiss (@var{bw1}, @var{interval}) -## Perform the binary hit-miss operation. -## -## If two structuring elements @var{se1} and @var{se1} are given, the hit-miss -## operation is defined as -## @example -## bw2 = erode(bw1, se1) & erode(!bw1, se2); -## @end example -## If instead an 'interval' array is given, two structuring elements are computed -## as -## @example -## se1 = (interval == 1) -## se2 = (interval == -1) -## @end example -## and then the operation is defined as previously. -## @seealso{bwmorph} -## @end deftypefn +## Copyright (C) 2008 Soren Hauberg <so...@ha...> +## +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## 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, see <http://www.gnu.org/licenses/>. -function bw = bwhitmiss(im, varargin) - ## Checkinput - if (nargin != 2 && nargin != 3) - print_usage(); - endif - if (!ismatrix(im) || !isreal(im)) - error("bwhitmiss: first input argument must be a real matrix"); - endif - - ## Get structuring elements - if (nargin == 2) # bwhitmiss (im, interval) +## -*- texinfo -*- +## @deftypefn {Function File} @var{bw2} = bwhitmiss (@var{bw1}, @var{se1}, @var{se1}) +## @deftypefnx{Function File} @var{bw2} = bwhitmiss (@var{bw1}, @var{interval}) +## Perform the binary hit-miss operation. +## +## If two structuring elements @var{se1} and @var{se1} are given, the hit-miss +## operation is defined as +## @example +## bw2 = erode(bw1, se1) & erode(!bw1, se2); +## @end example +## If instead an 'interval' array is given, two structuring elements are computed +## as +## @example +## se1 = (interval == 1) +## se2 = (interval == -1) +## @end example +## and then the operation is defined as previously. +## @seealso{bwmorph} +## @end deftypefn + +function bw = bwhitmiss(im, varargin) + ## Checkinput + if (nargin != 2 && nargin != 3) + print_usage(); + endif + if (!ismatrix(im) || !isreal(im)) + error("bwhitmiss: first input argument must be a real matrix"); + endif + + ## Get structuring elements + if (nargin == 2) # bwhitmiss (im, interval) interval = varargin{1}; - if (!isreal(interval)) - error("bwhitmiss: second input argument must be a real matrix"); - endif - if (!all( (interval(:) == 1) | (interval(:) == 0) | (interval(:) == -1) )) + if (!isreal(interval)) + error("bwhitmiss: second input argument must be a real matrix"); + endif + if (!all( (interval(:) == 1) | (interval(:) == 0) | (interval(:) == -1) )) error("bwhitmiss: second input argument can only contain the values -1, 0, and 1"); - endif - se1 = (interval == 1); - se2 = (interval == -1); - else # bwhitmiss (im, se1, se2) - se1 = varargin{1}; - se2 = varargin{2}; - if (!all((se1(:) == 1) | (se1(:) == 0)) || !all((se2(:) == 1) | (se2(:) == 0))) + endif + se1 = (interval == 1); + se2 = (interval == -1); + else # bwhitmiss (im, se1, se2) + se1 = varargin{1}; + se2 = varargin{2}; + if (!all((se1(:) == 1) | (se1(:) == 0)) || !all((se2(:) == 1) | (se2(:) == 0))) error("bwhitmiss: structuring elements can only contain zeros and ones."); - endif - endif - - ## Perform filtering - bw = erode(im, se1) & erode(!im, se2); - -endfunction + endif + endif + + ## Perform filtering + bw = erode(im, se1) & erode(!im, se2); + +endfunction Modified: trunk/octave-forge/main/image/inst/bwperim.m =================================================================== --- trunk/octave-forge/main/image/inst/bwperim.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/bwperim.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,35 +1,35 @@ -## Copyright (C) 2006 S\xF8ren Hauberg -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2, or (at your option) -## any later version. -## -## 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 file. If not, see <http://www.gnu.org/licenses/>. +## Copyright (C) 2006 S\xF8ren Hauberg <so...@ha...> +## +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## 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, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} @var{BW2} = bwperim(@var{BW1}) ## @deftypefnx{Function File} @var{BW2} = bwperim(@var{BW1}, @var{n}) ## Find the perimeter of objects in binary images. ## -## A pixel is part of an object perimeter if its value is one and there +## A pixel is part of an object perimeter if its value is one and there ## is at least one zero-valued pixel in its neighborhood. ## ## By default the neighborhood of a pixel is 4 nearest pixels, but -## if @var{n} is set to 8 the 8 nearest pixels will be considered. +## if @var{n} is set to 8 the 8 nearest pixels will be considered. ## @end deftypefn - -function out = bwperim(bw, n=4) + +function out = bwperim(bw, n=4) ## Input checking if (nargin < 1) print_usage(); - endif + endif if (!isbw(bw) || ndims(bw)!=2) error("bwperim: first input argument must be a 2-dimensional binary image"); endif @@ -41,7 +41,7 @@ bw = logical (bw); ## Translate image by one pixel in all directions - [rows, cols] = size(bw); + [rows, cols] = size(bw); north = [bw(2:end, :); zeros(1, cols, "logical")]; south = [zeros(1, cols, "logical"); bw(1:end-1, :)]; west = [bw(:, 2:end), zeros(rows, 1, "logical")]; @@ -54,7 +54,7 @@ south_west (2:end, 1:end-1) = bw (1:end-1, 2:end); endif - ## Do the comparing + ## Do the comparing if (n == 4) out = bw; idx = (north == bw) & (south == bw) & (west == bw) & (east == bw); Modified: trunk/octave-forge/main/image/inst/bwselect.m =================================================================== --- trunk/octave-forge/main/image/inst/bwselect.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/bwselect.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,3 +1,7 @@ +## Copyright (C) 1999 Andy Adler +## This code has no warrany whatsoever. +## Do what you like with this code as long as you leave this copyright in place. + ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{imout}, @var{idx}] =} bwselect(@var{im}, @var{cols}, @var{rows}, @var{connect}) ## Select connected regions in a binary image. @@ -17,12 +21,6 @@ ## @end table ## @end deftypefn -# Copyright (C) 1999 Andy Adler -# This code has no warrany whatsoever. -# Do what you like with this code as long as you -# leave this copyright in place. -# -# $Id$ function [imout, idx] = bwselect( im, cols, rows, connect ) if nargin<4 @@ -33,23 +31,3 @@ imout= zeros( size(jnk) ); imout( idx ) = 1; - -# -# $Log$ -# Revision 1.3 2007/01/04 23:41:47 hauberg -# Minor changes in help text -# -# Revision 1.2 2007/01/02 21:58:38 hauberg -# Documentation is now in Texinfo (looks better on the website) -# -# Revision 1.1 2006/08/20 12:59:32 hauberg -# Changed the structure to match the package system -# -# Revision 1.1 2002/03/17 02:38:52 aadler -# fill and edge detection operators -# -# Revision 1.1 1999/06/08 17:06:01 aadler -# Initial revision -# -# - Modified: trunk/octave-forge/main/image/inst/colfilt.m =================================================================== --- trunk/octave-forge/main/image/inst/colfilt.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/colfilt.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,3 +1,6 @@ +## Author: Paul Kienzle <pki...@us...> +## This program is granted to the public domain. + ## -*- texinfo -*- ## @deftypefn {Function File} colfilt(@var{A}, [@var{r}, @var{c}], [@var{m}, @var{n}], 'sliding', @var{f},...) ## Apply filter to matrix blocks @@ -25,9 +28,6 @@ ## The present version does not handle 'distinct' ## @end deftypefn -## This software is granted to the public domain -## Author: Paul Kienzle <pki...@us...> - function B = colfilt(A,filtsize,blksize,blktype,f,varargin) ## Input checking real_nargin = nargin - length(varargin); Modified: trunk/octave-forge/main/image/inst/conndef.m =================================================================== --- trunk/octave-forge/main/image/inst/conndef.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/conndef.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,17 +1,17 @@ -## Copyright (C) 2004 Josep Mones i Teixidor +## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{conn} = } conndef (@var{num_dims}, @var{type}) @@ -32,8 +32,6 @@ ## @seealso{iptcheckconn} ## @end deftypefn -## Author: Josep Mones i Teixidor <jm...@pu...> - function conn = conndef (num_dims, conntype) if (nargin!=2) Modified: trunk/octave-forge/main/image/inst/corr2.m =================================================================== --- trunk/octave-forge/main/image/inst/corr2.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/corr2.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,17 +1,17 @@ -## Copyright (C) 2000 Kai Habel +## Copyright (C) 2000 Kai Habel <kai...@gm...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} @var{r} = corr2 (@var{I},@var{J}) @@ -21,10 +21,6 @@ ## ## @end deftypefn - -## Author: Kai Habel <kai...@gm...> -## Date: 01/08/2000 - function r = corr2 (I, J) if (nargin != 2) Modified: trunk/octave-forge/main/image/inst/edge.m =================================================================== --- trunk/octave-forge/main/image/inst/edge.m 2012-04-16 11:47:35 UTC (rev 10247) +++ trunk/octave-forge/main/image/inst/edge.m 2012-04-16 12:49:47 UTC (rev 10248) @@ -1,25 +1,17 @@ -## Copyright (C) 2008 S\xF8ren Hauberg -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or -## (at your option) any later version. -## -## 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 +## Copyright (C) 2008 S\xF8ren Hauberg <so...@ha...> ## -## Note: The implementation and help text for the 'andy' edge detector came with -## the following notice: -## Copyright (C) 1999 Andy Adler -## This code has no warrany whatsoever. -## Do what you like with this code as long as you -## leave this copyright in place. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## 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, see <http://www.gnu.org/licenses/>. ## -*- te... [truncated message content] |
From: <car...@us...> - 2012-04-16 11:47:48
|
Revision: 10247 http://octave.svn.sourceforge.net/octave/?rev=10247&view=rev Author: carandraug Date: 2012-04-16 11:47:35 +0000 (Mon, 16 Apr 2012) Log Message: ----------- image: replace calls to usage() by print_usage() (usage is redundant and going to be deprecated in 3.8). Also small improvements on texinfo and use of defaulr arguments for simpler input check. Modified Paths: -------------- trunk/octave-forge/main/image/DESCRIPTION trunk/octave-forge/main/image/inst/applylut.m trunk/octave-forge/main/image/inst/bestblk.m trunk/octave-forge/main/image/inst/bwmorph.m trunk/octave-forge/main/image/inst/cmpermute.m trunk/octave-forge/main/image/inst/cmunique.m trunk/octave-forge/main/image/inst/col2im.m trunk/octave-forge/main/image/inst/colorgradient.m trunk/octave-forge/main/image/inst/dilate.m trunk/octave-forge/main/image/inst/erode.m trunk/octave-forge/main/image/inst/fftconv2.m trunk/octave-forge/main/image/inst/im2bw.m trunk/octave-forge/main/image/inst/im2col.m trunk/octave-forge/main/image/inst/imadjust.m trunk/octave-forge/main/image/inst/imdither.m trunk/octave-forge/main/image/inst/imnoise.m trunk/octave-forge/main/image/inst/makelut.m trunk/octave-forge/main/image/inst/qtdecomp.m trunk/octave-forge/main/image/inst/qtgetblk.m trunk/octave-forge/main/image/inst/qtsetblk.m trunk/octave-forge/main/image/inst/roicolor.m trunk/octave-forge/main/image/inst/uintlut.m Modified: trunk/octave-forge/main/image/DESCRIPTION =================================================================== --- trunk/octave-forge/main/image/DESCRIPTION 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/DESCRIPTION 2012-04-16 11:47:35 UTC (rev 10247) @@ -11,5 +11,5 @@ operations, linear filtering, and much more. Depends: octave (>= 3.4.0), signal Autoload: yes -License: GPL version 2 or later +License: GPLv3+, simplified BSD Url: http://octave.sf.net Modified: trunk/octave-forge/main/image/inst/applylut.m =================================================================== --- trunk/octave-forge/main/image/inst/applylut.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/applylut.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,20 +1,20 @@ -## Copyright (C) 2004 Josep Mones i Teixidor +## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {@var{A} = } applylut (@var{BW},@var{LUT}) +## @deftypefn {Function File} {@var{A} =} applylut (@var{BW}, @var{LUT}) ## Uses lookup tables to perform a neighbour operation on binary images. ## ## A = applylut(BW,LUT) returns the result of a neighbour operation @@ -28,11 +28,9 @@ ## @seealso{makelut} ## @end deftypefn -## Author: Josep Mones i Teixidor <jm...@pu...> - -function A = applylut(BW, LUT) +function A = applylut (BW, LUT) if (nargin != 2) - usage ("A = applylut(BW, LUT)"); + print_usage; endif nq=log2(length(LUT)); @@ -48,15 +46,9 @@ %! lut = makelut (inline ('sum (x (:)) >= 3', 'x'), 3); %! S = applylut (eye (5), lut); %! disp (S) -%! ## Everything should be 0 despite a diagonal which -%! ## doesn't reach borders. +%! ## Everything should be 0 despite a diagonal which doesn't reach borders. - %!assert(prod(applylut(eye(3),makelut(inline('x(1,1)==1','x'),2))==eye(3))==1); % 2-by-2 test %!assert(prod(applylut(eye(3),makelut(inline('x(2,2)==1','x'),3))==eye(3))==1); % 3-by-3 test %!assert(prod(applylut(eye(3),makelut(inline('x(3,3)==1','x'),3))== \ -%! applylut(eye(3),makelut(inline('x(2,2)==1','x'),2)))==1); - - - - +%! applylut(eye(3),makelut(inline('x(2,2)==1','x'),2)))==1); Modified: trunk/octave-forge/main/image/inst/bestblk.m =================================================================== --- trunk/octave-forge/main/image/inst/bestblk.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/bestblk.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,17 +1,17 @@ -## Copyright (C) 2004 Josep Mones i Teixidor +## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{siz} = } bestblk ([@var{m} @var{n}], @var{k}) @@ -40,20 +40,10 @@ ## @seealso{blkproc} ## @end deftypefn - -## Author: Josep Mones i Teixidor <jm...@pu...> - -function [varargout] = bestblk(ims,k) - if(nargin<1 || nargin>2) - usage("siz=bestblk([m,n],k), [mb,nb]=bestblk([m,n],k)"); - endif - if(nargout>2) - usage("siz=bestblk([m,n],k), [mb,nb]=bestblk([m,n],k)"); - endif - if(nargin<2) - k=100; - endif - if(!isvector(ims)) +function [varargout] = bestblk (ims, k = 100) + if (nargin < 1 || nargin > 2 || nargout > 2) + print_usage; + elseif (!isvector (ims)) error("bestblk: first parameter is not a vector."); endif ims=ims(:); @@ -67,8 +57,8 @@ for i=round(min(mi/10,k/2)):k pt=rem(mi,i); if(pt<p) - p=pt; - mb=i; + p=pt; + mb=i; endif endfor endif @@ -79,8 +69,8 @@ for i=round(min(ni/10,k/2)):k pt=rem(ni,i); if(pt<p) - p=pt; - nb=i; + p=pt; + nb=i; endif endfor endif @@ -100,19 +90,3 @@ %!assert(bestblk([300;100],150),[30;100]); %!assert(bestblk([256,128],17),[16;16]); - -% $Log$ -% Revision 1.3 2007/03/23 16:14:36 adb014 -% Update the FSF address -% -% Revision 1.2 2007/01/04 23:44:22 hauberg -% Minor changes in help text -% -% Revision 1.1 2006/08/20 12:59:31 hauberg -% Changed the structure to match the package system -% -% Revision 1.2 2005/07/03 01:10:19 pkienzle -% Try to correct for missing newline at the end of the file -% -% Revision 1.1 2004/08/15 19:01:05 jmones -% bestblk added: Calculates best block size for block processing Modified: trunk/octave-forge/main/image/inst/bwmorph.m =================================================================== --- trunk/octave-forge/main/image/inst/bwmorph.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/bwmorph.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,21 +1,21 @@ -## Copyright (C) 2004 Josep Mones i Teixidor +## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {@var{BW2} = } bwmorph (@var{BW},@var{operation}) -## @deftypefnx {Function File} {@var{BW2} = } bwmorph (@var{BW},@var{operation},@var{n}) +## @deftypefn {Function File} {@var{BW2} =} bwmorph (@var{BW}, @var{operation}) +## @deftypefnx {Function File} {@var{BW2} =} bwmorph (@var{BW}, @var{operation}, @var{n}) ## Perform a morphological operation on a binary image. ## ## BW2=bwmorph(BW,operation) performs a morphological operation @@ -187,23 +187,16 @@ ## @seealso{imdilate, imerode, imtophat, imbothat, makelut, applylut} ## @end deftypefn - ## TODO: As soon as Octave doesn't segfault when assigning values to a ## TODO: bool matrix, remove all conversions from lut to logical and ## TODO: just create it as a logical from the beginning. ## TODO: n behaviour should be tested in all cases for compatibility. -## Author: Josep Mones i Teixidor <jm...@pu...> - -function BW2 = bwmorph(BW, operation, n) +function BW2 = bwmorph (BW, operation, n = 1) if(nargin<2 || nargin>3) - usage("BW2=bwmorph(BW, operation [,n])"); - endif - if(nargin<3) - n=1; - endif - if(n<0) + print_usage; + elseif(n<0) error("bwmorph: n should be > 0"); elseif(n==0) ## we'll just return the same matrix (check this!) BW2=BW; @@ -587,38 +580,3 @@ %!assert(bwmorph(slBW,'skel-lantuejoul',2),[rslBW(1:8,:);logical(zeros(4,7))]); %!assert(bwmorph(slBW,'skel-lantuejoul',3),rslBW); %!assert(bwmorph(slBW,'skel-lantuejoul',Inf),rslBW); - - -% -% $Log$ -% Revision 1.4 2007/03/23 16:14:36 adb014 -% Update the FSF address -% -% Revision 1.3 2007/01/04 23:41:47 hauberg -% Minor changes in help text -% -% Revision 1.2 2006/10/15 08:04:55 hauberg -% Fixed texinfo in bwmorph -% -% Revision 1.1 2006/08/20 12:59:32 hauberg -% Changed the structure to match the package system -% -% Revision 1.6 2004/09/16 02:14:40 pkienzle -% Use frivolous uint8() call to block tests for version 2.1.57 and earlier -% -% Revision 1.5 2004/09/15 20:36:57 jmones -% logical(1) => true -% -% Revision 1.4 2004/09/15 20:00:00 jmones -% Updated tests to match Gonzalez&Woods example -% -% Revision 1.3 2004/09/15 13:51:10 pkienzle -% Use logical in tests; reduce number of shared variables in tests. -% -% Revision 1.2 2004/09/01 22:35:47 jmones -% Added Lantuejoul skeletonizing algorithm from Gonzalez&Woods -% -% Revision 1.1 2004/08/15 19:47:04 jmones -% bwmorph added: Perform a morphological operation on a binary image -% -% Modified: trunk/octave-forge/main/image/inst/cmpermute.m =================================================================== --- trunk/octave-forge/main/image/inst/cmpermute.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/cmpermute.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,21 +1,21 @@ -## Copyright (C) 2004 Josep Mones i Teixidor +## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {[@var{Y}, @var{newmap}] = } cmpermute (@var{X},@var{map}) -## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] = } cmpermute (@var{X},@var{map},@var{index}) +## @deftypefn {Function File} {[@var{Y}, @var{newmap}] =} cmpermute (@var{X}, @var{map}) +## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] =} cmpermute (@var{X}, @var{map}, @var{index}) ## Reorders colors in a colormap. ## ## @code{[Y,newmap]=cmpermute(X,map)} rearranges colormap @var{map} @@ -33,19 +33,16 @@ ## ## @end deftypefn - -## Author: Josep Mones i Teixidor <jm...@pu...> - -function [Y, newmap] = cmpermute(X, map, index) +function [Y, newmap] = cmpermute (X, map, index) switch(nargin) case(2) index=randperm(rows(map)); case(3) if(!isvector(index) || length(index)!=rows(map)) - error("cmpermute: invalid parameter index."); + error("cmpermute: invalid parameter index."); endif otherwise - usage("[Y, newmap] = cmpermute(X, map [, index])"); + print_usage; endswitch ## new colormap @@ -54,7 +51,7 @@ ## build reverse index rindex = zeros(size(index)); rindex(index) = 1:length(index); - + ## readapt indices if(isa(X,"uint8")) rindex=uint8(rindex-1); @@ -65,7 +62,6 @@ endif endfunction - %!demo %! [Y,newmap]=cmpermute([1:4],hot(4),4:-1:1) %! # colormap will be arranged in reverse order (so will image) @@ -105,28 +101,3 @@ %! assert(newmap(rows(newmap):-1:1,:),map); %! # we expect reversed indices in image %! assert(X,max(Y(:))+1-Y); - -% -% $Log$ -% Revision 1.3 2007/03/23 16:14:36 adb014 -% Update the FSF address -% -% Revision 1.2 2007/01/04 23:44:22 hauberg -% Minor changes in help text -% -% Revision 1.1 2006/08/20 12:59:32 hauberg -% Changed the structure to match the package system -% -% Revision 1.4 2004/09/08 15:01:28 pkienzle -% Redo tests: reduce # of shared variables; force full range of uint8 -% -% Revision 1.3 2004/09/08 14:13:08 jmones -% Synchronized with cmunique. uint8 support added. Tests working for 2.1.58 -% -% Revision 1.2 2004/08/18 14:57:42 jmones -% speed improvement suggested by Paul Kienzle -% -% Revision 1.1 2004/08/17 19:18:42 jmones -% cmpermute added: Reorders colors in a colormap -% -% Modified: trunk/octave-forge/main/image/inst/cmunique.m =================================================================== --- trunk/octave-forge/main/image/inst/cmunique.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/cmunique.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,22 +1,22 @@ -## Copyright (C) 2004 Josep Mones i Teixidor +## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {[@var{Y}, @var{newmap}] = } cmunique (@var{X},@var{map}) -## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] = } cmunique (@var{RGB}) -## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] = } cmunique (@var{I}) +## @deftypefn {Function File} {[@var{Y}, @var{newmap}] =} cmunique (@var{X}, @var{map}) +## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] =} cmunique (@var{RGB}) +## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] =} cmunique (@var{I}) ## Finds colormap with unique colors and corresponding image. ## ## @code{[Y,newmap]=cmunique(X,map)} returns an indexed image @var{y} @@ -50,12 +50,9 @@ ## ## @end deftypefn - -## Author: Josep Mones i Teixidor <jm...@pu...> - -function [Y, newmap] = cmunique(P1, P2) +function [Y, newmap] = cmunique (P1, P2) if (nargin<1 || nargin>2) - usage("[Y, newmap] = cmunique(X, map), [Y, newmap] = cmunique(RGB), [Y, newmap] = cmunique(I)"); + print_usage; endif @@ -70,17 +67,17 @@ else switch(size(P1,3)) case(1) - ## I case - [newmap,i,j]=unique(P1); ## calculate unique colormap - newmap=repmat(newmap,1,3); ## get a RGB colormap - Y=reshape(j,rows(P1),columns(P1)); ## Y is j reshaped + ## I case + [newmap,i,j]=unique(P1); ## calculate unique colormap + newmap=repmat(newmap,1,3); ## get a RGB colormap + Y=reshape(j,rows(P1),columns(P1)); ## Y is j reshaped case(3) - ## RGB case - map=[P1(:,:,1)(:), P1(:,:,2)(:), P1(:,:,3)(:)]; ## build a map with all values - [newmap,i,j]=unique(map, 'rows'); ## calculate unique colormap - Y=reshape(j,rows(P1),columns(P1)); ## Y is j reshaped + ## RGB case + map=[P1(:,:,1)(:), P1(:,:,2)(:), P1(:,:,3)(:)]; ## build a map with all values + [newmap,i,j]=unique(map, 'rows'); ## calculate unique colormap + Y=reshape(j,rows(P1),columns(P1)); ## Y is j reshaped otherwise - error("cmunique: first parameter is invalid."); + error("cmunique: first parameter is invalid."); endswitch ## if image was uint8 or uint16 we have to convert newmap to [0,1] range @@ -93,17 +90,14 @@ ## convert Y to uint8 (0-based indices then) Y=uint8(Y-1); endif - endfunction - %!demo %! [Y,newmap]=cmunique([1:4;5:8],[hot(4);hot(4)]) %! # Both rows are equal since map maps colors to the same value %! # cmunique will give the same indices to both - %!# This triggers invalid first parameter %!error(cmunique(zeros(3,3,2))); @@ -182,30 +176,3 @@ %! assert(Id,newmap(:,1)(Y+1)); %! assert(Id,newmap(:,2)(Y+1)); %! assert(Id,newmap(:,3)(Y+1)); - -% -% $Log$ -% Revision 1.3 2007/03/23 16:14:36 adb014 -% Update the FSF address -% -% Revision 1.2 2007/01/04 23:44:22 hauberg -% Minor changes in help text -% -% Revision 1.1 2006/08/20 12:59:32 hauberg -% Changed the structure to match the package system -% -% Revision 1.4 2004/09/08 16:06:31 jmones -% Solved problem with uint8 indexing and reduced tests on types (suggested by P. Kienzle) -% -% Revision 1.3 2004/09/03 17:07:26 jmones -% Support for uint8 and uint16 types added. -% -% Revision 1.2 2004/08/17 15:48:03 jmones -% Clarified expected data for RGB images in doc -% -% Revision 1.1 2004/08/17 15:45:40 jmones -% cmunique: Finds colormap with unique colors and corresponding image -% -% - - Modified: trunk/octave-forge/main/image/inst/col2im.m =================================================================== --- trunk/octave-forge/main/image/inst/col2im.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/col2im.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,21 +1,21 @@ -## Copyright (C) 2004 Josep Mones i Teixidor +## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {@var{A} = } col2im (@var{B}, [@var{m},@var{n}], [@var{mm},@var{nn}], @var{block_type}) -## @deftypefnx {Function File} {@var{A} = } col2im (@var{B}, [@var{m},@var{n}], [@var{mm},@var{nn}]) +## @deftypefn {Function File} {@var{A} =} col2im (@var{B}, [@var{m},@var{n}], [@var{mm},@var{nn}], @var{block_type}) +## @deftypefnx {Function File} {@var{A} =} col2im (@var{B}, [@var{m},@var{n}], [@var{mm},@var{nn}]) ## Rearranges matrix columns into blocks. ## ## @code{A=col2im(B,[m,n],[mm,nn],block_type)} rearranges columns of @@ -42,16 +42,10 @@ ## @seealso{im2col} ## @end deftypefn -## Author: Josep Mones i Teixidor <jm...@pu...> - -function A = col2im(B, sblock, sb, block_type) - if(nargin<3 || nargin>4) - usage("A=col2im(B, [m,n], [mm,nn] [, block_type])"); +function A = col2im (B, sblock, sb, block_type = "sliding") + if(nargin < 3 || nargin > 4) + print_usage; endif - - if(nargin!=4) - block_type='sliding'; - endif ## common checks if(!ismatrix(B)) @@ -72,39 +66,39 @@ switch(block_type) case('distinct') if(rows(B)!=m*n) - error("col2im: B height must be m*n for 'distinct' block_type."); + error("col2im: B height must be m*n for 'distinct' block_type."); endif if(rem(mm,m)!=0) - error("col2im: mm should be multiple of m"); + error("col2im: mm should be multiple of m"); endif if(rem(nn,n)!=0) - error("col2im: nn should be multiple of n"); + error("col2im: nn should be multiple of n"); endif mt=mm/m; nt=nn/n; if(columns(B)<mt*nt) - error("col2im: B's width is too small (should be mm*nn/(m*m))."); + error("col2im: B's width is too small (should be mm*nn/(m*m))."); endif c=1; for i=1:mt - ## TODO: check if we can horzcat([],uint8([10;11])) in a - ## future Octave version > 2.1.58 in order to deuglify this! - r=reshape(B(:,c),m,n); - c+=1; - for j=2:nt - r=horzcat(r, reshape(B(:,c),m,n)); - c+=1; - endfor - if(i==1) ## this workarrounds a bug in ver<=2.1.57 cat implementation - A=r; - else - A=vertcat(A,r); - endif + ## TODO: check if we can horzcat([],uint8([10;11])) in a + ## future Octave version > 2.1.58 in order to deuglify this! + r=reshape(B(:,c),m,n); + c+=1; + for j=2:nt + r=horzcat(r, reshape(B(:,c),m,n)); + c+=1; + endfor + if(i==1) ## this workarrounds a bug in ver<=2.1.57 cat implementation + A=r; + else + A=vertcat(A,r); + endif endfor - + case('sliding') if(!all(size(B)==[1,(mm-m+1)*(nn-n+1)])) - error("col2im: wrong B size. Should be 1-by-(mm-m+1)*(nn-n+1)."); + error("col2im: wrong B size. Should be 1-by-(mm-m+1)*(nn-n+1)."); endif A=reshape(B, mm-m+1, nn-n+1); @@ -120,7 +114,6 @@ %! C=col2im(B,[2,5],[4,10],'distinct') %! # Divide A using distinct blocks and reverse operation - %!shared B, Ad %! v=[1:10]'; %! r=reshape(v,2,5); @@ -149,32 +142,8 @@ %!assert(col2im(ones(1,(10-2+1)*(7-3+1)),[2,3],[10,7]), ones((10-2+1),(7-3+1))); %!assert(col2im(ones(1,(10-2+1)*(7-3+1)),[2,3],[10,7],'sliding'), ones((10-2+1),(7-3+1))); - %!# disctint on uint8 %!assert(col2im(uint8(B),[2,5],[6,10],'distinct'), uint8(Ad)); %!# now sliding on uint8 %!assert(col2im(ones(1,(10-2+1)*(7-3+1),"uint8"),[2,3],[10,7]), ones((10-2+1),(7-3+1),"uint8")); - - -% -% $Log$ -% Revision 1.4 2007/03/23 16:14:36 adb014 -% Update the FSF address -% -% Revision 1.3 2007/01/04 23:46:17 hauberg -% Minor changes in help text -% -% Revision 1.2 2007/01/04 23:37:54 hauberg -% Minor changes in help text -% -% Revision 1.1 2006/08/20 12:59:32 hauberg -% Changed the structure to match the package system -% -% Revision 1.2 2004/09/03 17:57:42 jmones -% Added support for int* and uint* types -% -% Revision 1.1 2004/08/18 14:39:07 jmones -% im2col and col2im added -% -% Modified: trunk/octave-forge/main/image/inst/colorgradient.m =================================================================== --- trunk/octave-forge/main/image/inst/colorgradient.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/colorgradient.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,5 +1,8 @@ +## Author: Paul Kienzle <pki...@us...> +## This program is granted to the public domain. + ## -*- texinfo -*- -## @deftypefn {Function File} @var{M} = colorgradient(@var{C}, @var{w}, @var{n}) +## @deftypefn {Function File} {@var{M} =} colorgradient (@var{C}, @var{w}, @var{n}) ## Define a colour map which smoothly traverses the given colors. ## @var{C} contains the colours, one row per r,g,b value. ## @var{w}(i) is the relative length of the transition from colour i to colour i+1 @@ -14,12 +17,9 @@ ## @end example ## @end deftypefn -## This program is granted to the public domain. -## Author: Paul Kienzle <pki...@us...> - -function ret = colorgradient(C,w,n) +function ret = colorgradient (C, w, n) if nargin < 1 || nargin > 3 - usage("M = colorgradient(C,w,n)") + print_usage; endif if nargin == 1 Modified: trunk/octave-forge/main/image/inst/dilate.m =================================================================== --- trunk/octave-forge/main/image/inst/dilate.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/dilate.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,22 +1,22 @@ -## Copyright (C) 2004 Josep Mones i Teixidor +## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {@var{BW2} = } dilate (@var{BW1},@var{SE}) -## @deftypefnx {Function File} {@var{BW2} = } dilate (@var{BW1},@var{SE},@var{alg}) -## @deftypefnx {Function File} {@var{BW2} = } dilate (@var{BW1},@var{SE},...,@var{n}) +## @deftypefn {Function File} {@var{BW2} =} dilate (@var{BW1}, @var{SE}) +## @deftypefnx {Function File} {@var{BW2} =} dilate (@var{BW1}, @var{SE}, @var{alg}) +## @deftypefnx {Function File} {@var{BW2} =} dilate (@var{BW1}, @var{SE}, @dots{}, @var{n}) ## Perform a dilation morphological operation on a binary image. ## ## @emph{warning}: @code{dilate} has been deprecated in favor of @@ -37,21 +37,24 @@ ## BW2 = dilate(BW1, SE, alg) returns the result of a dilation operation ## using algorithm @var{alg}. Only 'spatial' is implemented at the moment. ## -## BW2 = dilate(BW1, SE, ..., n) returns the result of @var{n} dilation +## BW2 = dilate(BW1, SE, @dots{}, n) returns the result of @var{n} dilation ## operations on @var{BW1}. ## ## @seealso{erode} ## @end deftypefn -## Author: Josep Mones i Teixidor <jm...@pu...> +function BW2 = dilate (BW1, SE, a, b) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "`dilate' has been deprecated in favor of `imdilate'. This function will be removed from future versions of the `image' package"); + endif -function BW2 = dilate(BW1, SE, a, b) - warning ("'dilate' has been deprecated in favor of 'imdilate'. This function will be removed from future versions of the 'image' package"); - alg='spatial'; n=1; if (nargin < 1 || nargin > 4) - usage ("BW2 = dilate(BW1, SE [, alg] [, n])"); + print_usage; endif if nargin == 4 alg=a; Modified: trunk/octave-forge/main/image/inst/erode.m =================================================================== --- trunk/octave-forge/main/image/inst/erode.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/erode.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,22 +1,22 @@ -## Copyright (C) 2004 Josep Mones i Teixidor +## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {@var{BW2} = } erode (@var{BW1},@var{SE}) -## @deftypefnx {Function File} {@var{BW2} = } erode (@var{BW1},@var{SE},@var{alg}) -## @deftypefnx {Function File} {@var{BW2} = } erode (@var{BW1},@var{SE},...,@var{n}) +## @deftypefn {Function File} {@var{BW2} =} erode (@var{BW1}, @var{SE}) +## @deftypefnx {Function File} {@var{BW2} =} erode (@var{BW1}, @var{SE}, @var{alg}) +## @deftypefnx {Function File} {@var{BW2} =} erode (@var{BW1}, @var{SE}, @dots{}, @var{n}) ## Perform an erosion morphological operation on a binary image. ## ## @emph{warning}: @code{erode} has been deprecated in favor of @@ -37,21 +37,24 @@ ## BW2 = erode(BW1, SE, alg) returns the result of a erosion operation ## using algorithm @var{alg}. Only 'spatial' is implemented at the moment. ## -## BW2 = erosion(BW1, SE, ..., n) returns the result of @var{n} erosion +## BW2 = erosion(BW1, SE, @dots{}, n) returns the result of @var{n} erosion ## operations on @var{BW1}. ## ## @seealso{dilate} ## @end deftypefn -## Author: Josep Mones i Teixidor <jm...@pu...> +function BW2 = erode (BW1, SE, a, b) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "`erode' has been deprecated in favor of `imerode'. This function will be removed from future versions of the `image' package"); + endif -function BW2 = erode(BW1, SE, a, b) - warning ("'erode' has been deprecated in favor of 'imerode'. This function will be removed from future versions of the 'image' package"); - alg='spatial'; n=1; if (nargin < 1 || nargin > 4) - usage ("BW2 = erode(BW1, SE [, alg] [, n])"); + print_usage; endif if nargin == 4 alg=a; @@ -86,9 +89,5 @@ %! erode(ones(5,5),ones(3,3)) %! % creates a zeros border around ones. - - %!assert(erode([0,1,0;1,1,1;0,1,0],[0,0,0;0,0,1;0,1,1])==[1,0,0;0,0,0;0,0,0]); %!assert(erode([0,1,0;1,1,1;0,1,0],[0,1;1,1])==[1,0,0;0,0,0;0,0,0]); - - Modified: trunk/octave-forge/main/image/inst/fftconv2.m =================================================================== --- trunk/octave-forge/main/image/inst/fftconv2.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/fftconv2.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,26 +1,25 @@ ## Copyright (C) 2004 Stefan van der Walt <st...@su...> +## All rights reserved. ## -## This program is free software; redistribution and use in source and -## binary forms, with or without modification, are permitted provided that -## the following conditions are met: +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following conditions are met: ## -## 1. Redistributions of source code must retain the above copyright -## notice, this list of conditions and the following disclaimer. -## 2. Redistributions in binary form must reproduce the above copyright -## notice, this list of conditions and the following disclaimer in the -## documentation and/or other materials provided with the distribution. +## 1 Redistributions of source code must retain the above copyright notice, +## this list of conditions and the following disclaimer. +## 2 Redistributions in binary form must reproduce the above copyright +## notice, this list of conditions and the following disclaimer in the +## documentation and/or other materials provided with the distribution. ## -## THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -## ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' +## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -## ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -## OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -## SUCH DAMAGE. +## ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +## ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +## SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +## CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ## -*- texinfo -*- ## @deftypefn {Function File} fftconv2 (@var{a}, @var{b}, @var{shape}) Modified: trunk/octave-forge/main/image/inst/im2bw.m =================================================================== --- trunk/octave-forge/main/image/inst/im2bw.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/im2bw.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,31 +1,28 @@ -## Copyright (C) 2000 Kai Habel +## Copyright (C) 2000 Kai Habel <kai...@gm...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} @var{BW}= im2bw (@var{I},threshold) -## @deftypefnx {Function File} @var{BW}= im2bw (@var{X},@var{cmap},threshold) +## @deftypefn {Function File} {@var{BW} =} im2bw (@var{I}, threshold) +## @deftypefnx {Function File} {@var{BW} =} im2bw (@var{X}, @var{cmap}, threshold) ## Converts image data types to a black-white (binary) image. ## The treshold value should be in the range [0,1]. ## @end deftypefn -## Author: Kai Habel <kai...@gm...> -## Date: 19. March 2000 - function BW = im2bw (img, a, b) if (nargin < 2 || nargin > 3) - usage("im2bw: number of arguments must be 2 or 3"); + print_usage; endif ## Convert img to gray scale Modified: trunk/octave-forge/main/image/inst/im2col.m =================================================================== --- trunk/octave-forge/main/image/inst/im2col.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/im2col.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,22 +1,22 @@ -## Copyright (C) 2004 Josep Mones i Teixidor +## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {@var{B} = } im2col (@var{A}, [@var{m},@var{n}], @var{block_type}) -## @deftypefnx {Function File} {@var{B} = } im2col (@var{A}, [@var{m},@var{n}]) -## @deftypefnx {Function File} {@var{B} = } im2col (@var{A}, 'indexed', ...) +## @deftypefn {Function File} {@var{B} =} im2col (@var{A}, [@var{m}, @var{n}], @var{block_type}) +## @deftypefnx {Function File} {@var{B} =} im2col (@var{A}, [@var{m}, @var{n}]) +## @deftypefnx {Function File} {@var{B} =} im2col (@var{A}, 'indexed', @dots{}) ## Rearranges image blocks into columns. ## ## @code{B=im2col(A, [m, n], blocktype)} rearranges blocks in @var{A} @@ -47,7 +47,7 @@ ## @code{B=im2col(A,[m,n])} takes @code{distinct} as a default value for ## @var{block_type}. ## -## @code{B=im2col(A,'indexed',...)} will treat @var{A} as an indexed +## @code{B=im2col(A,'indexed', @dots{})} will treat @var{A} as an indexed ## image, so it will pad using 1 if @var{A} is double. All other cases ## (incluing indexed matrices with uint8 and uint16 types and ## non-indexed images) will use 0 as padding value. @@ -58,11 +58,9 @@ ## @seealso{col2im} ## @end deftypefn -## Author: Josep Mones i Teixidor <jm...@pu...> - -function B = im2col(A, varargin) - if(nargin<2 || nargin>4) - usage("B=im2col(B [, 'indexed'], [m,n] [, block_type])"); +function B = im2col (A, varargin) + if(nargin < 2 || nargin > 4) + print_usage; endif ## check 'indexed' presence @@ -70,14 +68,14 @@ p=1; if(ischar(varargin{1}) && strcmp(varargin{1}, "indexed")) if(nargin<3) - usage("B=im2col(B [, 'indexed'], [m,n] [, block_type])"); + print_usage; endif indexed=true; p+=1; if(isa(A,"uint8") || isa(A,"uint16")) - padval=0; + padval=0; else - padval=1; + padval=1; endif else padval=0; @@ -106,9 +104,8 @@ ## if we didn't have 'indexed' but had 4 parameters there's an error if(nargin>p) - usage("B=im2col(B [, 'indexed'], [m,n] [, block_type])"); + print_usage; endif - ## common checks if(!ismatrix(A)) @@ -121,42 +118,42 @@ sp=mod(-size(A)',[m;n]); if(any(sp)) - A=padarray(A,sp,padval,'post'); + A=padarray(A,sp,padval,'post'); endif ## iterate through all blocks B=[]; for i=1:m:size(A,1) ## up to bottom - for j=1:n:size(A,2) ## left to right - ## TODO: check if we can horzcat([],uint8([10;11])) in a - ## future Octave version > 2.1.58 - if(isempty(B)) - B=A(i:i+m-1,j:j+n-1)(:); - else - B=horzcat(B, A(i:i+m-1,j:j+n-1)(:)); - endif - endfor + for j=1:n:size(A,2) ## left to right + ## TODO: check if we can horzcat([],uint8([10;11])) in a + ## future Octave version > 2.1.58 + if(isempty(B)) + B=A(i:i+m-1,j:j+n-1)(:); + else + B=horzcat(B, A(i:i+m-1,j:j+n-1)(:)); + endif + endfor endfor case('sliding') if(indexed) - disp("WARNING: 'indexed' has no sense when using sliding."); + disp("WARNING: 'indexed' has no sense when using sliding."); endif if(m>size(A,1) || n>size(A,2)) - error("im2col: block size can't be greater than image size in sliding"); + error("im2col: block size can't be greater than image size in sliding"); endif ## TODO: check if matlab uses top-down and left-right order B=[]; for j=1:1:size(A,2)-n+1 ## left to right - for i=1:1:size(A,1)-m+1 ## up to bottom - ## TODO: check if we can horzcat([],uint8([10;11])) in a - ## future Octave version > 2.1.58 - if(isempty(B)) - B=A(i:i+m-1,j:j+n-1)(:); - else - B=horzcat(B, A(i:i+m-1,j:j+n-1)(:)); - endif - endfor + for i=1:1:size(A,1)-m+1 ## up to bottom + ## TODO: check if we can horzcat([],uint8([10;11])) in a + ## future Octave version > 2.1.58 + if(isempty(B)) + B=A(i:i+m-1,j:j+n-1)(:); + else + B=horzcat(B, A(i:i+m-1,j:j+n-1)(:)); + endif + endfor endfor otherwise @@ -215,31 +212,3 @@ %!# now sliding uint8 & uint16 %!assert(im2col(uint8(As),[2,4],'sliding'), uint8(Bs)); %!assert(im2col(uint16(As),[2,4],'sliding'), uint16(Bs)); - - - - -% -% $Log$ -% Revision 1.4 2007/03/23 16:14:36 adb014 -% Update the FSF address -% -% Revision 1.3 2007/01/04 23:47:43 hauberg -% Put seealso before end deftypefn -% -% Revision 1.2 2007/01/04 23:37:54 hauberg -% Minor changes in help text -% -% Revision 1.1 2006/08/20 12:59:33 hauberg -% Changed the structure to match the package system -% -% Revision 1.3 2005/09/08 02:00:17 pkienzle -% [for Bill Denney] isstr -> ischar -% -% Revision 1.2 2004/09/03 17:37:08 jmones -% Added support for int* and uint* types -% -% Revision 1.1 2004/08/18 14:39:07 jmones -% im2col and col2im added -% -% Modified: trunk/octave-forge/main/image/inst/imadjust.m =================================================================== --- trunk/octave-forge/main/image/inst/imadjust.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/imadjust.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,30 +1,26 @@ -## Copyright (C) 2004 Josep Mones i Teixidor +## Copyright (C) 1999,2000 Kai Habel <kai...@gm...> +## Copyright (C) 2004 Josep Mones i Teixidor <jm...@pu...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## 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. +## 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, see <http://www.gnu.org/licenses/>. -## -## -## Based on old imadjust.m (GPL): -## Copyright (C) 1999,2000 Kai Habel +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. - ## -*- texinfo -*- -## @deftypefn {Function File} @var{J}= imadjust (@var{I}) -## @deftypefnx {Function File} @var{J}= imadjust (@var{I},[@var{low_in};@var{high_in}]) -## @deftypefnx {Function File} @var{J}= imadjust (@var{I},[@var{low_in};@var{high_in}],[@var{low_out};@var{high_out}]) -## @deftypefnx {Function File} @var{J}= imadjust (..., @var{gamma}) -## @deftypefnx {Function File} @var{newmap}= imadjust (@var{map}, ...) -## @deftypefnx {Function File} @var{RGB_out}= imadjust (@var{RGB}, ...) +## @deftypefn {Function File} {@var{J} =} imadjust (@var{I}) +## @deftypefnx {Function File} {@var{J} =} imadjust (@var{I},[@var{low_in};@var{high_in}]) +## @deftypefnx {Function File} {@var{J} =} imadjust (@var{I},[@var{low_in};@var{high_in}],[@var{low_out};@var{high_out}]) +## @deftypefnx {Function File} {@var{J} =} imadjust (@dots{}, @var{gamma}) +## @deftypefnx {Function File} {@var{newmap} =} imadjust (@var{map}, @dots{}) +## @deftypefnx {Function File} {@var{RGB_out} =} imadjust (@var{RGB}, @dots{}) ## Adjust image or colormap values to a specified range. ## ## @code{J=imadjust(I)} adjusts intensity image @var{I} values so that @@ -47,14 +43,14 @@ ## @var{high_out} instead of 0 and 1. A default value @code{[]} can also ## be used for this parameter, which is taken as @code{[0;1]}. ## -## @code{J=imadjust(...,gamma)} takes, in addition of 3 parameters +## @code{J=imadjust(@dots{},gamma)} takes, in addition of 3 parameters ## explained above, an extra parameter @var{gamma}, which specifies the ## shape of the mapping curve between input elements and output ## elements, which is linear (as taken if this parameter is omitted). If ## @var{gamma} is above 1, then function is weighted towards lower ## values, and if below 1, towards higher values. ## -## @code{newmap=imadjust(map,...)} applies a transformation to a +## @code{newmap=imadjust(map,@dots{})} applies a transformation to a ## colormap @var{map}, which output is @var{newmap}. This transformation ## is the same as explained above, just using a map instead of an image. ## @var{low_in}, @var{high_in}, @var{low_out}, @var{high_out} and @@ -62,7 +58,7 @@ ## for all three color components of a map; or it can be 1-by-3 ## vectors, to define unique mappings for each component. ## -## @code{RGB_out=imadjust(RGB,...)} adjust RGB image @var{RGB} (a +## @code{RGB_out=imadjust(RGB,@dots{})} adjust RGB image @var{RGB} (a ## M-by-N-by-3 array) the same way as specified in images and colormaps. ## Here too @var{low_in}, @var{high_in}, @var{low_out}, @var{high_out} and ## @var{gamma} can be scalars or 1-by-3 matrices, to specify the same @@ -95,46 +91,27 @@ ## @seealso{stretchlim, brighten} ## @end deftypefn -## Author: Josep Mones i Teixidor <jm...@pu...> - ## TODO: When Octave 2.1.58 is out multiply indices if input argument is ## TODO: of class int* or uint*. -function ret = imadjust (image, in, out, gamma) +function ret = imadjust (image, in = stretchlim (image), out = [0;1], gamma = 1) if (nargin < 1 || nargin > 4) - usage ("imadjust(...) number of arguments must be between 1 and 4"); + print_usage; endif - if (nargin < 4) - gamma = 1; ## default gamma - endif - if !(ismatrix(image)) error ("imadjust(image,...) first parameter must be a image matrix or colormap"); endif - if (nargin==1) - in=stretchlim(image); ## this saturates 1% on lower and 1% on - out=[0;1]; ## higher values - endif - - if (nargin==2) - out=[0;1]; ## default out - endif - if !((ismatrix(in) || isempty(in)) && (ismatrix(out) || isempty(out)) ) - usage("imadjust(image,[low high],[bottom top],gamma)"); + print_usage; endif if (isempty(in)) in=[0;1]; ## default in endif - if (isempty(out)) - out=[0;1]; ## default out - endif - simage=size(image); if (length(simage)==3 && simage(3)==3) ## image is rgb @@ -157,13 +134,13 @@ ret=[]; ## process each color for i=1:3 - ret=horzcat(ret,__imadjust_plane__(image(:,i),in(1,i),in(2,i),out(1,i),out(2,i),gamma(i))); + ret=horzcat(ret,__imadjust_plane__(image(:,i),in(1,i),in(2,i),out(1,i),out(2,i),gamma(i))); endfor else ## image is a intensity image if( !isvector(in) || length(in)!=2 || !isvector(out) || length(out)!=2 || !isscalar(gamma) || (gamma<0) || (gamma==Inf) ) - error("imadjust: on an intensity image, in and out must be 2-by-1 and gamma a positive scalar."); + error("imadjust: on an intensity image, in and out must be 2-by-1 and gamma a positive scalar."); endif ret=__imadjust_plane__(image,in(1),in(2),out(1),out(2),gamma); endif @@ -173,7 +150,6 @@ endif endfunction - ## This does all the work. I has a plane; li and hi input low and high ## values; and lo and ho, output bottom and top values. ## Image negative is computed if ho<lo although nothing special is @@ -184,7 +160,6 @@ ret = ret + (I >= hi) .* ho; endfunction - ## Checks in, out and gamma to see if they are ok for colormap and RGB ## cases. function [in, out, gamma]=__imadjust_check_3d_args__(in, out, gamma) @@ -226,7 +201,6 @@ endfunction - # bad arguments # bad images @@ -251,17 +225,16 @@ %!# a test with input and output args %!assert(imadjust([1:100],[50;90],[-50;-30]), \ -%! [-50*ones(1,49), linspace(-50,-30,90-50+1), -30*ones(1,10)]); +%! [-50*ones(1,49), linspace(-50,-30,90-50+1), -30*ones(1,10)]); %!# a test with input and output args in a row vector (Compatibility behaviour) %!assert(imadjust([1:100],[50,90],[-50,-30]), \ -%! [-50*ones(1,49), linspace(-50,-30,90-50+1), -30*ones(1,10)]); +%! [-50*ones(1,49), linspace(-50,-30,90-50+1), -30*ones(1,10)]); %!# the previous test, "negated" %!assert(imadjust([1:100],[50;90],[-30;-50]), \ -%! [-30*ones(1,49), linspace(-30,-50,90-50+1), -50*ones(1,10)]); +%! [-30*ones(1,49), linspace(-30,-50,90-50+1), -50*ones(1,10)]); - %!shared cm,cmn %! cm=[[1:10]',[2:11]',[3:12]']; %! cmn=([[1:10]',[2:11]',[3:12]']-1)/11; @@ -280,7 +253,7 @@ %! [[0,linspace(0,1,6),1,1,1]', \ %! [0,0,linspace(0,1,6),1,1]', \ %! [0,0,0,linspace(0,1,6),1]'] \ -%! ))(:)) < 1e-10 \ +%! ))(:)) < 1e-10 \ %! ); %!# a colormap, different input and output on each @@ -296,10 +269,9 @@ %! [[0,linspace(0,1,6),1,1,1]', \ %! [0,0,linspace(0,1,6).^2,1,1]'+1, \ %! [0,0,0,linspace(0,1,6).^3,1]'+2] \ -%! )(:))) < 1e-10 \ +%! )(:))) < 1e-10 \ %! ); - %!shared iRGB,iRGBn,oRGB %! iRGB=zeros(10,1,3); %! iRGB(:,:,1)=[1:10]'; @@ -325,7 +297,6 @@ %! t(:,:,3)+=30; %! assert(imadjust(iRGBn,[0;1],[10,20,30;11,21,31]),t); - %!# a RGB, different input on each, we need increased tolerance for this test %!assert(sum(abs((imadjust(iRGB,[2,4,6;7,9,11],[0;1]) - oRGB)(:))) < 1e-10); @@ -342,20 +313,3 @@ %! t(:,:,2)=t(:,:,2).^2+1; %! t(:,:,3)=t(:,:,3).^3+2; %! assert(sum(abs((imadjust(iRGB,[2,4,6;7,9,11],[0,1,2;1,2,3],[1,2,3]) - t)(:))) < 1e-10); - - -% -% $Log$ -% Revision 1.3 2007/03/23 16:14:37 adb014 -% Update the FSF address -% -% Revision 1.2 2007/01/04 23:47:43 hauberg -% Put seealso before end deftypefn -% -% Revision 1.1 2006/08/20 12:59:33 hauberg -% Changed the structure to match the package system -% -% Revision 1.3 2004/09/01 22:51:14 jmones -% Fully recoded: NDArray support, docs, tests, more compatible with MATLAB, changed copyright -% -% Modified: trunk/octave-forge/main/image/inst/imdither.m =================================================================== --- trunk/octave-forge/main/image/inst/imdither.m 2012-04-16 11:24:26 UTC (rev 10246) +++ trunk/octave-forge/main/image/inst/imdither.m 2012-04-16 11:47:35 UTC (rev 10247) @@ -1,26 +1,29 @@ ## Copyright (C) 2009 Sergey Kirgizov ## -## This program is free software; you can redistribute it and/or -## modify it under the terms of the GNU General Public License -## as published by the Free Software Foundation; either version 3 -## of the License, or (at your option) any later version. -## -## 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. - +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## 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, see <http://www.gnu.org/licenses/>. + ## -*- texinfo -*- -## @deftypefn {Function File} {[@var{Y}, @var{newmap}] = } imdither (@var{img}) -## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] = } imdither (@var{img}, @ +## @deftypefn {Function File} {[@var{Y}, @var{newmap}] =} imdither (@var{img}) +## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] =} imdither (@var{img}, @ ## @var{colors}) -## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] = } imdither (@var{img}, @ +## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] =} imdither (@var{img}, @ ## @var{colors}, @var{dithtype}) -## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] = } imdither (@var{img}, @ +## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] =} imdither (@var{img}, @ ## @var{map}) -## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] = } imdither (@var{img}, @ +## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] =} imdither (@var{img}, @ ## @var{map}, @var{colors}) -## @deftypefnx {Function File} {[@var{Y}, @var{newmap}] = } imdither(@var{img}, @ +## @deftypefnx {Functi... [truncated message content] |
From: <jpi...@us...> - 2012-04-16 11:24:35
|
Revision: 10246 http://octave.svn.sourceforge.net/octave/?rev=10246&view=rev Author: jpicarbajal Date: 2012-04-16 11:24:26 +0000 (Mon, 16 Apr 2012) Log Message: ----------- geometry: fixing details Modified Paths: -------------- trunk/octave-forge/main/geometry/inst/geom2d/distancePointEdge.m trunk/octave-forge/main/geometry/inst/shape2d/shape2polygon.m trunk/octave-forge/main/geometry/inst/shape2d/shapecentroid.m trunk/octave-forge/main/geometry/inst/shape2d/shapeplot.m trunk/octave-forge/main/geometry/inst/shape2d/shapetransform.m Modified: trunk/octave-forge/main/geometry/inst/geom2d/distancePointEdge.m =================================================================== --- trunk/octave-forge/main/geometry/inst/geom2d/distancePointEdge.m 2012-04-16 10:39:05 UTC (rev 10245) +++ trunk/octave-forge/main/geometry/inst/geom2d/distancePointEdge.m 2012-04-16 11:24:26 UTC (rev 10246) @@ -76,9 +76,11 @@ % (Size of tp is the max number of edges or points) delta = dx .* dx + dy .* dy; + mask = delta < eps; + delta(mask) = 1; warning ('off', 'Octave:broadcast'); tp = ((point(:, 1) - edge(1, :)) .* dx + (point(:, 2) - edge(2, :)) .* dy) ./ delta; - tp(:,delta < eps) = 0; + tp(:,mask) = 0; % change position to ensure projected point is located on the edge tp(tp < 0) = 0; Modified: trunk/octave-forge/main/geometry/inst/shape2d/shape2polygon.m =================================================================== --- trunk/octave-forge/main/geometry/inst/shape2d/shape2polygon.m 2012-04-16 10:39:05 UTC (rev 10245) +++ trunk/octave-forge/main/geometry/inst/shape2d/shape2polygon.m 2012-04-16 11:24:26 UTC (rev 10246) @@ -54,7 +54,7 @@ %! 58.870 -38.083 -89.358 232.362]}; %! %! % Estimate a good tolerance -%! n = cell2mat(cellfun(@(x)curveval(x,[0 1]), shape, 'uniformoutput',false)); +%! n = cell2mat(cellfun(@(x)curveval(x,rand(1,10)), shape, 'uniformoutput',false)); %! dr = (max(n(:,1))-min(n(:,1)))*(max(n(:,2))-min(n(:,2)))*40; %! p = shape2polygon (shape,'tol',dr); %! Modified: trunk/octave-forge/main/geometry/inst/shape2d/shapecentroid.m =================================================================== --- trunk/octave-forge/main/geometry/inst/shape2d/shapecentroid.m 2012-04-16 10:39:05 UTC (rev 10245) +++ trunk/octave-forge/main/geometry/inst/shape2d/shapecentroid.m 2012-04-16 11:24:26 UTC (rev 10246) @@ -66,9 +66,8 @@ %! 0 0]}; %! CoM = shapecentroid (boomerang) %! Gcentroid = centroid(shape2polygon(boomerang)) -%! %! figure(1); clf; -%! shapeplot(boomerang,10,'-o'); +%! shapeplot(boomerang,'-o'); %! hold on %! drawPoint(CoM,'xk;shape centroid;'); %! drawPoint(Gcentroid,'xr;point centroid;'); @@ -85,7 +84,7 @@ %! CoM = shapecentroid (Lshape) %! Gcentroid = centroid (shape2polygon (Lshape)) %! -%! shapeplot(Lshape,10,'-o'); +%! shapeplot(Lshape,'-o'); %! hold on %! drawPoint(CoM,'xk;shape centroid;'); %! drawPoint(Gcentroid,'xr;point centroid;'); Modified: trunk/octave-forge/main/geometry/inst/shape2d/shapeplot.m =================================================================== --- trunk/octave-forge/main/geometry/inst/shape2d/shapeplot.m 2012-04-16 10:39:05 UTC (rev 10245) +++ trunk/octave-forge/main/geometry/inst/shape2d/shapeplot.m 2012-04-16 11:24:26 UTC (rev 10246) @@ -29,8 +29,8 @@ function h = shapeplot(shape, varargin) - n = cell2mat(cellfun(@(x)curveval(x,[0 1]), shape, 'uniformoutput',false)); - dr = (max(n(:,1))-min(n(:,1)))*(max(n(:,2))-min(n(:,2)))/10; + n = cell2mat(cellfun(@(x)curveval(x,rand(1,5)), shape, 'uniformoutput',false)); + dr = (max(n(:,1))-min(n(:,1)))*(max(n(:,2))-min(n(:,2)))/100; p = shape2polygon(shape,'tol', dr); h = drawPolygon(p,varargin{:}); Modified: trunk/octave-forge/main/geometry/inst/shape2d/shapetransform.m =================================================================== --- trunk/octave-forge/main/geometry/inst/shape2d/shapetransform.m 2012-04-16 10:39:05 UTC (rev 10245) +++ trunk/octave-forge/main/geometry/inst/shape2d/shapetransform.m 2012-04-16 11:24:26 UTC (rev 10246) @@ -98,14 +98,12 @@ %! shape = shapetransform (shape,-T + [2; 0]); %! %! close -%! shapeplot (shape,10,'-r','linewidth',2) +%! shapeplot (shape,'-r','linewidth',2) %! hold on %! for i = 1:9 %! T = createRotation (i*pi/5)(1:2,1:2)/exp(0.3*i); -%! shapeplot (shapetransform(shape, T), 10, 'color',rand(1,3),'linewidth',2); +%! shapeplot (shapetransform(shape, T), 'color',rand(1,3),'linewidth',2); %! end %! hold off %! axis tight %! axis square - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-16 10:39:16
|
Revision: 10245 http://octave.svn.sourceforge.net/octave/?rev=10245&view=rev Author: jpicarbajal Date: 2012-04-16 10:39:05 +0000 (Mon, 16 Apr 2012) Log Message: ----------- geometry: Checking date INDEX and DESCRIPTION Modified Paths: -------------- trunk/octave-forge/main/geometry/DESCRIPTION trunk/octave-forge/main/geometry/INDEX trunk/octave-forge/main/geometry/NEWS Modified: trunk/octave-forge/main/geometry/DESCRIPTION =================================================================== --- trunk/octave-forge/main/geometry/DESCRIPTION 2012-04-16 10:33:04 UTC (rev 10244) +++ trunk/octave-forge/main/geometry/DESCRIPTION 2012-04-16 10:39:05 UTC (rev 10245) @@ -1,6 +1,6 @@ Name: Geometry Version: 1.5.0 -Date: 2012-04-15 +Date: 2012-04-16 Author: David Legland <dav...@gr...>, José Luis García Pallero <jgp...@gm...>, Juan Pablo Carbajal <car...@if...> Maintainer: Juan Pablo Carbajal <car...@if...> Title: Computational Geometry Modified: trunk/octave-forge/main/geometry/INDEX =================================================================== --- trunk/octave-forge/main/geometry/INDEX 2012-04-16 10:33:04 UTC (rev 10244) +++ trunk/octave-forge/main/geometry/INDEX 2012-04-16 10:39:05 UTC (rev 10245) @@ -16,6 +16,7 @@ centroid distancePoints drawPoint + isCounterClockwise isPointOnRay isPointInCircle isPointOnCircle @@ -115,10 +116,15 @@ drawBezierCurve cbezier2poly 2D Polygons + curvature drawPolygon + oc_polybool + parametrize + reversePolyline + reversePolygon simplifypolygon simplifypolyline - oc_polybool + supportFunction 2D Piecewise polynomial shapes polygon2shape shape2polygon @@ -136,7 +142,6 @@ drawParabola drawShape hexagonalGrid - isCounterClockwise squareGrid triangleGrid Geometric graphs creation Modified: trunk/octave-forge/main/geometry/NEWS =================================================================== --- trunk/octave-forge/main/geometry/NEWS 2012-04-16 10:33:04 UTC (rev 10244) +++ trunk/octave-forge/main/geometry/NEWS 2012-04-16 10:39:05 UTC (rev 10245) @@ -1,7 +1,7 @@ Summary of important user-visible changes for releases of the geometry package =============================================================================== -geometry-1.5.0 Release Date: 2012-04-15 Release Manager: Juan Pablo Carbajal +geometry-1.5.0 Release Date: 2012-04-16 Release Manager: Juan Pablo Carbajal =============================================================================== * Added functions: @@ -21,7 +21,7 @@ - reversePolygon.m and reversePolyline.m: reverse the orders of the points in of polygon/line. - - supportfunction.m: Compute support function of a polygon. + - supportFunction.m: Compute support function of a polygon. * Changed functions: - distancePointEdge.m: Now the function computes the distance between all points This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-16 10:33:14
|
Revision: 10244 http://octave.svn.sourceforge.net/octave/?rev=10244&view=rev Author: jpicarbajal Date: 2012-04-16 10:33:04 +0000 (Mon, 16 Apr 2012) Log Message: ----------- geometry: adding functions to polygon2d admin: removing package after html generation Modified Paths: -------------- trunk/octave-forge/admin/releasePKG.m trunk/octave-forge/main/geometry/inst/polygons2d/supportFunction.m Modified: trunk/octave-forge/admin/releasePKG.m =================================================================== --- trunk/octave-forge/admin/releasePKG.m 2012-04-16 10:17:46 UTC (rev 10243) +++ trunk/octave-forge/admin/releasePKG.m 2012-04-16 10:33:04 UTC (rev 10244) @@ -139,6 +139,10 @@ warning ("md5sum failed.\n"); end + % Uninstall package + printf("Uninstalling...\n"); + fflush(stdout); + pkg ('uninstall', pkgname); endif % do_doc Modified: trunk/octave-forge/main/geometry/inst/polygons2d/supportFunction.m =================================================================== --- trunk/octave-forge/main/geometry/inst/polygons2d/supportFunction.m 2012-04-16 10:17:46 UTC (rev 10243) +++ trunk/octave-forge/main/geometry/inst/polygons2d/supportFunction.m 2012-04-16 10:33:04 UTC (rev 10244) @@ -47,24 +47,19 @@ function h = supportFunction(polygon, varargin) N = 24; - u = 0:2*pi/N:2*pi*(1-1/N); + u = (0:2*pi/N:2*pi*(1-1/N)).'; if length(varargin)==1 var = varargin{1}; if length(var)==1 N = var; - u = 0:2*pi/N:2*pi*(1-1/N); + u = (0:2*pi/N:2*pi*(1-1/N)).'; else - u = var; + u = var(:); end end - % ensure u vertical vector - if size(u, 1)==1 - u=u'; - end - h = zeros(size(u)); for i=1:length(u) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-16 10:17:57
|
Revision: 10243 http://octave.svn.sourceforge.net/octave/?rev=10243&view=rev Author: jpicarbajal Date: 2012-04-16 10:17:46 +0000 (Mon, 16 Apr 2012) Log Message: ----------- geometry: porting new functions to polygon2d Modified Paths: -------------- trunk/octave-forge/main/geometry/NEWS Added Paths: ----------- trunk/octave-forge/main/geometry/inst/polygons2d/reversePolygon.m trunk/octave-forge/main/geometry/inst/polygons2d/reversePolyline.m trunk/octave-forge/main/geometry/inst/polygons2d/supportFunction.m Modified: trunk/octave-forge/main/geometry/NEWS =================================================================== --- trunk/octave-forge/main/geometry/NEWS 2012-04-16 10:01:07 UTC (rev 10242) +++ trunk/octave-forge/main/geometry/NEWS 2012-04-16 10:17:46 UTC (rev 10243) @@ -6,10 +6,23 @@ * Added functions: - curveval.m: Evaluates a polynomial curve defined as a 2-by-N matrix. + - curve2polyline.m: Converts a polynomial curve into a polyline by the adaptive sampling method. + - simplifypolyline.m: Ramer-Douglas-Peucker algorithm to simplify polylines. + - parametrize.m: Estimate a parametrization of a polygon/line based on the distance + between the points. + + - curvature.m: Estimation of the curvature of a polygon/line based on polynomial + approximation. + + - reversePolygon.m and reversePolyline.m: reverse the orders of the points in + of polygon/line. + + - supportfunction.m: Compute support function of a polygon. + * Changed functions: - distancePointEdge.m: Now the function computes the distance between all points and all edges. A third optional argument provides @@ -19,7 +32,7 @@ - simplifypolygon.m returned empty polygons when points are repeated, i.e when the polygon is not correctly formed. - Removed installation warnings. - + =============================================================================== geometry-1.4.1 Release Date: 2012-03-24 Release Manager: Juan Pablo Carbajal =============================================================================== Added: trunk/octave-forge/main/geometry/inst/polygons2d/reversePolygon.m =================================================================== --- trunk/octave-forge/main/geometry/inst/polygons2d/reversePolygon.m (rev 0) +++ trunk/octave-forge/main/geometry/inst/polygons2d/reversePolygon.m 2012-04-16 10:17:46 UTC (rev 10243) @@ -0,0 +1,44 @@ +%% Copyright (C) 2003-2011 David Legland <dav...@gr...> +%% Copyright (C) 2012 Adapted to Octave by Juan Pablo Carbajal <car...@if...> +%% All rights reserved. +%% +%% Redistribution and use in source and binary forms, with or without +%% modification, are permitted provided that the following conditions are met: +%% +%% 1 Redistributions of source code must retain the above copyright notice, +%% this list of conditions and the following disclaimer. +%% 2 Redistributions in binary form must reproduce the above copyright +%% notice, this list of conditions and the following disclaimer in the +%% documentation and/or other materials provided with the distribution. +%% +%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' +%% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +%% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +%% ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +%% ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +%% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +%% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +%% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +%% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +%% OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%% +%% The views and conclusions contained in the software and documentation are +%% those of the authors and should not be interpreted as representing official +%% policies, either expressed or implied, of the copyright holders. + +%% -*- texinfo -*- +%% @deftypefn {Function File} {@var{poly2} = } reversePolygon (@var{poly}) +%% Reverse a polygon, by iterating vertices from the end +%% +%% POLY2 = reversePolygon(POLY) +%% POLY2 has same vertices as POLY, but in different order. The first +%% vertex of the polygon is still the same. +%% +%% @seealso{reversePolyline} +%% @end deftypefn + +function rev = reversePolygon(poly) + + rev = poly([1 end:-1:2], :); + +endfunction Added: trunk/octave-forge/main/geometry/inst/polygons2d/reversePolyline.m =================================================================== --- trunk/octave-forge/main/geometry/inst/polygons2d/reversePolyline.m (rev 0) +++ trunk/octave-forge/main/geometry/inst/polygons2d/reversePolyline.m 2012-04-16 10:17:46 UTC (rev 10243) @@ -0,0 +1,43 @@ +%% Copyright (C) 2003-2011 David Legland <dav...@gr...> +%% Copyright (C) 2012 Adapted to Octave by Juan Pablo Carbajal <car...@if...> +%% All rights reserved. +%% +%% Redistribution and use in source and binary forms, with or without +%% modification, are permitted provided that the following conditions are met: +%% +%% 1 Redistributions of source code must retain the above copyright notice, +%% this list of conditions and the following disclaimer. +%% 2 Redistributions in binary form must reproduce the above copyright +%% notice, this list of conditions and the following disclaimer in the +%% documentation and/or other materials provided with the distribution. +%% +%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' +%% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +%% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +%% ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +%% ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +%% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +%% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +%% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +%% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +%% OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%% +%% The views and conclusions contained in the software and documentation are +%% those of the authors and should not be interpreted as representing official +%% policies, either expressed or implied, of the copyright holders. + +%% -*- texinfo -*- +%% @deftypefn {Function File} {@var{poly2} = } reversePolyline (@var{poly}) +%% Reverse a polyline, by iterating vertices from the end +%% +%% POLY2 = reversePolyline(POLY) +%% POLY2 has same vertices as POLY, but POLY2(i,:) is the same as +%% POLY(END-i+1,:). +%% +%% @seealso{reversePolygon} +%% @end deftypefn +function rev = reversePolyline(poly) + + rev = poly(end:-1:1, :); + +endfunction Added: trunk/octave-forge/main/geometry/inst/polygons2d/supportFunction.m =================================================================== --- trunk/octave-forge/main/geometry/inst/polygons2d/supportFunction.m (rev 0) +++ trunk/octave-forge/main/geometry/inst/polygons2d/supportFunction.m 2012-04-16 10:17:46 UTC (rev 10243) @@ -0,0 +1,77 @@ +%% Copyright (C) 2003-2011 David Legland <dav...@gr...> +%% Copyright (C) 2012 Adapted to Octave by Juan Pablo Carbajal <car...@if...> +%% All rights reserved. +%% +%% Redistribution and use in source and binary forms, with or without +%% modification, are permitted provided that the following conditions are met: +%% +%% 1 Redistributions of source code must retain the above copyright notice, +%% this list of conditions and the following disclaimer. +%% 2 Redistributions in binary form must reproduce the above copyright +%% notice, this list of conditions and the following disclaimer in the +%% documentation and/or other materials provided with the distribution. +%% +%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' +%% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +%% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +%% ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +%% ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +%% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +%% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +%% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +%% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +%% OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%% +%% The views and conclusions contained in the software and documentation are +%% those of the authors and should not be interpreted as representing official +%% policies, either expressed or implied, of the copyright holders. + +%% -*- texinfo -*- +%% @deftypefn {Function File} {@var{h} = } suppportFunction (@var{polygon}) +%% @deftypefnx {Function File} {@var{h} = } suppportFunction (@var{polygon}, @var{n}) +%% @deftypefnx {Function File} {@var{h} = } suppportFunction (@var{polygon}, @var{v}) +%% Compute support function of a polygon +%% +%% H = supportFunction(POLYGON, N) +%% uses N points for suport function approximation +%% +%% H = supportFunction(POLYGON) +%% assume 24 points for approximation +%% +%% H = supportFunction(POLYGON, V) +%% where V is a vector, uses vector V of angles to compute support +%% function. +%% +%% @seealso{convexification} +%% @end deftypefn + +function h = supportFunction(polygon, varargin) + N = 24; + u = 0:2*pi/N:2*pi*(1-1/N); + + if length(varargin)==1 + var = varargin{1}; + if length(var)==1 + N = var; + u = 0:2*pi/N:2*pi*(1-1/N); + else + u = var; + end + end + + % ensure u vertical vector + if size(u, 1)==1 + u=u'; + end + + + h = zeros(size(u)); + + for i=1:length(u) + + v = repmat([cos(u(i)) sin(u(i))], [size(polygon, 1), 1]); + + h(i) = max(dot(polygon, v, 2)); + end + +endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-16 10:01:18
|
Revision: 10242 http://octave.svn.sourceforge.net/octave/?rev=10242&view=rev Author: jpicarbajal Date: 2012-04-16 10:01:07 +0000 (Mon, 16 Apr 2012) Log Message: ----------- geometry: porting new functions to polygon2d Modified Paths: -------------- trunk/octave-forge/main/geometry/NEWS trunk/octave-forge/main/geometry/PKG_ADD trunk/octave-forge/main/geometry/PKG_DEL Added Paths: ----------- trunk/octave-forge/main/geometry/inst/polygons2d/curvature.m trunk/octave-forge/main/geometry/inst/polygons2d/parametrize.m Modified: trunk/octave-forge/main/geometry/NEWS =================================================================== --- trunk/octave-forge/main/geometry/NEWS 2012-04-16 09:53:45 UTC (rev 10241) +++ trunk/octave-forge/main/geometry/NEWS 2012-04-16 10:01:07 UTC (rev 10242) @@ -18,7 +18,8 @@ * Solved bugs: - simplifypolygon.m returned empty polygons when points are repeated, i.e when the polygon is not correctly formed. - + - Removed installation warnings. + =============================================================================== geometry-1.4.1 Release Date: 2012-03-24 Release Manager: Juan Pablo Carbajal =============================================================================== Modified: trunk/octave-forge/main/geometry/PKG_ADD =================================================================== --- trunk/octave-forge/main/geometry/PKG_ADD 2012-04-16 09:53:45 UTC (rev 10241) +++ trunk/octave-forge/main/geometry/PKG_ADD 2012-04-16 10:01:07 UTC (rev 10242) @@ -30,7 +30,7 @@ %dep_folder = [dep_folder filesep arch]; -if (! exist (fullfile (pkg_folder, "inst"), "dir")) +if (! exist (fullfile (dirname, "inst"), "dir")) %% Installing for ii=1:length (dirlist) addpath ( [ pkg_folder filesep() dirlist{ii}],"-end") @@ -40,7 +40,7 @@ %% Testing warning("geometry:Devel","Adding path for testing."); for ii=1:length(dirlist) - addpath ([ pkg_folder "/inst/" dirlist{ii}]) + addpath ([ dirname "/inst/" dirlist{ii}]) endfor endif %addpath (dep_folder) Modified: trunk/octave-forge/main/geometry/PKG_DEL =================================================================== --- trunk/octave-forge/main/geometry/PKG_DEL 2012-04-16 09:53:45 UTC (rev 10241) +++ trunk/octave-forge/main/geometry/PKG_DEL 2012-04-16 10:01:07 UTC (rev 10242) @@ -29,7 +29,7 @@ %dep_folder = [dep_folder filesep arch]; -if (! exist (fullfile (pkg_folder, "inst"), "dir")) +if (! exist (fullfile (dirname, "inst"), "dir")) ## Run this if the package is installed for ii=1:length (dirlist) rmpath ( [ pkg_folder filesep() dirlist{ii}]) @@ -37,7 +37,7 @@ else warning("geometry:Devel","Removing path for testing."); for ii=1:length(dirlist) - rmpath ([ pkg_folder "/inst/" dirlist{ii}]) + rmpath ([ dirname "/inst/" dirlist{ii}]) endfor endif %rmpath (dep_folder); Added: trunk/octave-forge/main/geometry/inst/polygons2d/curvature.m =================================================================== --- trunk/octave-forge/main/geometry/inst/polygons2d/curvature.m (rev 0) +++ trunk/octave-forge/main/geometry/inst/polygons2d/curvature.m 2012-04-16 10:01:07 UTC (rev 10242) @@ -0,0 +1,177 @@ +%% Copyright (C) 2003-2011 David Legland <dav...@gr...> +%% Copyright (C) 2012 Adapted to Octave by Juan Pablo Carbajal <car...@if...> +%% All rights reserved. +%% +%% Redistribution and use in source and binary forms, with or without +%% modification, are permitted provided that the following conditions are met: +%% +%% 1 Redistributions of source code must retain the above copyright notice, +%% this list of conditions and the following disclaimer. +%% 2 Redistributions in binary form must reproduce the above copyright +%% notice, this list of conditions and the following disclaimer in the +%% documentation and/or other materials provided with the distribution. +%% +%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' +%% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +%% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +%% ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +%% ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +%% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +%% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +%% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +%% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +%% OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%% +%% The views and conclusions contained in the software and documentation are +%% those of the authors and should not be interpreted as representing official +%% policies, either expressed or implied, of the copyright holders. + +%% -*- texinfo -*- +%% @deftypefn {Function File} {@var{kappa} = } curvature (@var{t}, @var{px}, @var{py},@var{method},@var{degree}) +%% @deftypefnx {Function File} {@var{kappa} = } curvature (@var{t}, @var{poly},@var{method},@var{degree}) +%% @deftypefnx {Function File} {@var{kappa} = } curvature (@var{px}, @var{py},@var{method},@var{degree}) +%% @deftypefnx {Function File} {@var{kappa} = } curvature (@var{points},@var{method},@var{degree}) +%% @deftypefnx {Function File} {[@var{kappa} @var{poly} @var{t}] = } curvature (@dots{}) +%% Estimate curvature of a polyline defined by points. +%% +%% First compute an approximation of the curve given by PX and PY, with +%% the parametrization @var{t}. Then compute the curvature of approximated curve +%% for each point. +%% @var{method} used for approximation can be only: 'polynom', with specified degree. +%% Further methods will be provided in a future version. +%% @var{t}, @var{px}, and @var{py} are N-by-1 array of the same length. The points +%% can be specified as a single N-by-2 array. +%% +%% If the argument @var{t} is not given, the parametrization is estimated using +%% function @code{parametrize}. +%% +%% If requested, @var{poly} contains the approximating polygon evlauted at the +%% parametrization @var{t}. +%% +%% @seealso{parametrize, polygons2d} +%% @end deftypefn + +function [kappa, varargout] = curvature(varargin) + + % default values + degree = 5; + t=0; % parametrization of curve + tc=0; % indices of points wished for curvature + + + % ================================================================= + + % Extract method and degree ------------------------------ + + nargin = length(varargin); + varN = varargin{nargin}; + varN2 = varargin{nargin-1}; + + if ischar(varN2) + % method and degree are specified + method = varN2; + degree = varN; + varargin = varargin(1:nargin-2); + elseif ischar(varN) + % only method is specified, use degree 6 as default + method = varN; + varargin = varargin{1:nargin-1}; + else + % method and degree are implicit : use 'polynom' and 6 + method = 'polynom'; + end + + % extract input parametrization and curve. ----------------------- + nargin = length(varargin); + if nargin==1 + % parameters are just the points -> compute caracterization. + var = varargin{1}; + px = var(:,1); + py = var(:,2); + elseif nargin==2 + var = varargin{2}; + if size(var, 2)==2 + % parameters are t and POINTS + px = var(:,1); + py = var(:,2); + t = varargin{1}; + else + % parameters are px and py + px = varargin{1}; + py = var; + end + elseif nargin==3 + var = varargin{2}; + if size(var, 2)==2 + % parameters are t, POINTS, and tc + px = var(:,1); + py = var(:,2); + t = varargin{1}; + else + % parameters are t, px and py + t = varargin{1}; + px = var; + py = varargin{3}; + end + elseif nargin==4 + % parameters are t, px, py and tc + t = varargin{1}; + px = varargin{2}; + py = varargin{3}; + tc = varargin{4}; + end + + % compute implicit parameters -------------------------- + + % if t and/or tc are not computed, use implicit definition + if t==0 + t = parametrize(px, py, 'norm'); + end + + % if tc not defined, compute curvature for all points + if tc==0 + tc = t; + else + % else convert from indices to parametrization values + tc = t(tc); + end + + + % ================================================================= + % compute curvature for each point of the curve + + if strcmp(method, 'polynom') + % compute coefficients of interpolation functions + x0 = polyfit(t, px, degree); + y0 = polyfit(t, py, degree); + + % compute coefficients of first and second derivatives. In the case of a + % polynom, it is possible to compute coefficient of derivative by + % multiplying with a matrix. + derive = diag(degree:-1:0); + xp = circshift(x0*derive, [0 1]); + yp = circshift(y0*derive, [0 1]); + xs = circshift(xp*derive, [0 1]); + ys = circshift(yp*derive, [0 1]); + + % compute values of first and second derivatives for needed points + xprime = polyval(xp, tc); + yprime = polyval(yp, tc); + xsec = polyval(xs, tc); + ysec = polyval(ys, tc); + + % compute value of curvature + kappa = (xprime.*ysec - xsec.*yprime)./ ... + power(xprime.*xprime + yprime.*yprime, 3/2); + + if nargout > 1 + varargout{1} = [polyval(x0,tc(:)) polyval(y0,tc(:))]; + if nargout > 2 + varargout{2} = tc; + end + end + else + error('unknown method'); + end + +endfunction Added: trunk/octave-forge/main/geometry/inst/polygons2d/parametrize.m =================================================================== --- trunk/octave-forge/main/geometry/inst/polygons2d/parametrize.m (rev 0) +++ trunk/octave-forge/main/geometry/inst/polygons2d/parametrize.m 2012-04-16 10:01:07 UTC (rev 10242) @@ -0,0 +1,96 @@ +%% Copyright (C) 2003-2011 David Legland <dav...@gr...> +%% Copyright (C) 2012 Adapted to Octave by Juan Pablo Carbajal <car...@if...> +%% All rights reserved. +%% +%% Redistribution and use in source and binary forms, with or without +%% modification, are permitted provided that the following conditions are met: +%% +%% 1 Redistributions of source code must retain the above copyright notice, +%% this list of conditions and the following disclaimer. +%% 2 Redistributions in binary form must reproduce the above copyright +%% notice, this list of conditions and the following disclaimer in the +%% documentation and/or other materials provided with the distribution. +%% +%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' +%% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +%% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +%% ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +%% ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +%% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +%% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +%% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +%% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +%% OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%% +%% The views and conclusions contained in the software and documentation are +%% those of the authors and should not be interpreted as representing official +%% policies, either expressed or implied, of the copyright holders. + +%% -*- texinfo -*- +%% @deftypefn {Function File} {@var{par} = } parametrize (@var{poly}) +%% @deftypefnx {Function File} {@var{par} = } parametrize (@var{px},@var{py}) +%% @deftypefnx {Function File} {@var{par} = } parametrize (@dots{},@var{normalize}) +%% +%% Parametrization of a curve, based on edges length +%% +%% Returns a parametrization of the curve defined by the serie of points, +%% based on euclidean distance between two consecutive points. +%% POLY is a N-by-2 array, representing coordinates of vertices. The +%% result PAR is N-by-1, and contains the cumulative length of edges until +%% corresponding vertex. The function also accepts the polygon as two inputs +%% @var{px} and @var{py} representinx coordinates x and y respectively. +%% When optional argument @var{normalize} is non-empty @var{par} is rescaled +%% such that the last element equals 1, i.e. @code{@var{par}(end)==1}. +%% +%% Example +%% @example +%% % Parametrize a circle approximation +%% poly = circleToPolygon([0 0 1], 200); +%% p = parametrize(poly); +%% p(end) +%% ans = +%% 6.2829 +%% p = parametrize(poly,'norm'); +%% p(end) +%% ans = +%% 1 +%% p = parametrize(poly,true); +%% p(end) +%% ans = +%% 1 +%% @end example +%% +%% @seealso{polygons2d, polylineLength} +%% @end deftypefn +function par = parametrize(varargin) + %% Process inputs + + % extract vertex coordinates + if size(varargin{1}, 2) > 1 + % vertices in a single array + pts = varargin{1}; + normalize = numel(varargin) > 1; + elseif size(varargin{1}, 2) == 1 && numel(varargin) >= 2 + % points as separate arrays + pts = [varargin{1} varargin{2}]; + normalize = numel(varargin) > 2; + end + + %% Parametrize polyline + + % compute cumulative sum of euclidean distances between consecutive + % vertices, setting distance of first vertex to 0. + if size(pts, 2) == 2 + % process points in 2D + par = [0 ; cumsum(hypot(diff(pts(:,1)), diff(pts(:,2))))]; + else + % process points in arbitrary dimension + par = [0 ; cumsum(sqrt(sum(diff(pts).^2, 2)))]; + end + + % eventually rescale between 0 and 1 + if normalize + par = par / par(end); + end + +endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-16 09:53:56
|
Revision: 10241 http://octave.svn.sourceforge.net/octave/?rev=10241&view=rev Author: carandraug Date: 2012-04-16 09:53:45 +0000 (Mon, 16 Apr 2012) Log Message: ----------- vrml: replace calls to usage by print_usage (uysage is redundant and going to be deprecated in 3.8) Modified Paths: -------------- trunk/octave-forge/main/vrml/inst/vrml_PointLight.m trunk/octave-forge/main/vrml/inst/vrml_Viewpoint.m Modified: trunk/octave-forge/main/vrml/inst/vrml_PointLight.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_PointLight.m 2012-04-16 09:50:24 UTC (rev 10240) +++ trunk/octave-forge/main/vrml/inst/vrml_PointLight.m 2012-04-16 09:53:45 UTC (rev 10241) @@ -37,7 +37,7 @@ function s = vrml_PointLight (varargin) -if mod(nargin,2) != 0, usage("vrml_PointLight('key',val,...)"); end +if mod(nargin,2) != 0, print_usage; end h = struct (varargin{:}); tpl = struct ("ambientIntensity", "%8.3f",\ Modified: trunk/octave-forge/main/vrml/inst/vrml_Viewpoint.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_Viewpoint.m 2012-04-16 09:50:24 UTC (rev 10240) +++ trunk/octave-forge/main/vrml/inst/vrml_Viewpoint.m 2012-04-16 09:53:45 UTC (rev 10241) @@ -38,7 +38,7 @@ function s = vrml_Viewpoint (varargin) -if mod(nargin,2) != 0, usage("vrml_Viewpoint('key',val,...)"); end +if mod(nargin,2) != 0, print_usage; end h = struct (varargin{:}); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-16 09:50:35
|
Revision: 10240 http://octave.svn.sourceforge.net/octave/?rev=10240&view=rev Author: carandraug Date: 2012-04-16 09:50:24 +0000 (Mon, 16 Apr 2012) Log Message: ----------- vrml: make use of nargin function rather than replacing it by a var as it was before Modified Paths: -------------- trunk/octave-forge/main/vrml/inst/save_vrml.m trunk/octave-forge/main/vrml/inst/vrml_faces.m trunk/octave-forge/main/vrml/inst/vrml_group.m trunk/octave-forge/main/vrml/inst/vrml_lines.m Modified: trunk/octave-forge/main/vrml/inst/save_vrml.m =================================================================== --- trunk/octave-forge/main/vrml/inst/save_vrml.m 2012-04-16 09:40:34 UTC (rev 10239) +++ trunk/octave-forge/main/vrml/inst/save_vrml.m 2012-04-16 09:50:24 UTC (rev 10240) @@ -67,10 +67,8 @@ lightstr = ""; # Read eventual options -nargin = nargin(); ninit = nargin; - i = 1; args = nargin; # nargin is now a function while --args, Modified: trunk/octave-forge/main/vrml/inst/vrml_faces.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_faces.m 2012-04-16 09:40:34 UTC (rev 10239) +++ trunk/octave-forge/main/vrml/inst/vrml_faces.m 2012-04-16 09:50:24 UTC (rev 10240) @@ -89,7 +89,6 @@ opt0 = " smooth convex " ; verbose = 0 ; -# nargin -= 2 ; i = 1; while (nargin -2) >= i Modified: trunk/octave-forge/main/vrml/inst/vrml_group.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_group.m 2012-04-16 09:40:34 UTC (rev 10239) +++ trunk/octave-forge/main/vrml/inst/vrml_group.m 2012-04-16 09:50:24 UTC (rev 10240) @@ -17,7 +17,6 @@ function v = vrml_group ( varargin ) -nargin = nargin(); if nargin == 0, return end s = ""; Modified: trunk/octave-forge/main/vrml/inst/vrml_lines.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_lines.m 2012-04-16 09:40:34 UTC (rev 10239) +++ trunk/octave-forge/main/vrml/inst/vrml_lines.m 2012-04-16 09:50:24 UTC (rev 10240) @@ -30,7 +30,6 @@ function s = vrml_lines(x,f,varargin) if nargin < 2, f = ones (1,columns(x)); end -args = nargin; # nargin is now a function col = [1, 0, 0] ; opt1 = " col " ; @@ -38,10 +37,9 @@ verbose = 0 ; -args -= 2 ; i=1; -while args>=i , +while (nargin -2) >=i , tmp = varargin{i++} ; # pos 2.1.39 if ! ischar(tmp) , This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-16 09:40:40
|
Revision: 10239 http://octave.svn.sourceforge.net/octave/?rev=10239&view=rev Author: carandraug Date: 2012-04-16 09:40:34 +0000 (Mon, 16 Apr 2012) Log Message: ----------- vrml_faces: fix bug introduced back on r7440 (no release had been made with this bug) Revision Links: -------------- http://octave.svn.sourceforge.net/octave/?rev=7440&view=rev Modified Paths: -------------- trunk/octave-forge/main/vrml/inst/vrml_faces.m Modified: trunk/octave-forge/main/vrml/inst/vrml_faces.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_faces.m 2012-04-16 09:35:51 UTC (rev 10238) +++ trunk/octave-forge/main/vrml/inst/vrml_faces.m 2012-04-16 09:40:34 UTC (rev 10239) @@ -89,10 +89,10 @@ opt0 = " smooth convex " ; verbose = 0 ; - nargin -= 2 ; +# nargin -= 2 ; i = 1; - while nargin>=i + while (nargin -2) >= i tmp = varargin{i++}; if ! ischar(tmp) , error ("vrml_faces : Non-string option : \n") ; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-16 09:36:01
|
Revision: 10238 http://octave.svn.sourceforge.net/octave/?rev=10238&view=rev Author: carandraug Date: 2012-04-16 09:35:51 +0000 (Mon, 16 Apr 2012) Log Message: ----------- vrml_frame: fix error commited on r10219 due to conflict of revisions Revision Links: -------------- http://octave.svn.sourceforge.net/octave/?rev=10219&view=rev Modified Paths: -------------- trunk/octave-forge/main/vrml/inst/vrml_frame.m Modified: trunk/octave-forge/main/vrml/inst/vrml_frame.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_frame.m 2012-04-16 09:34:06 UTC (rev 10237) +++ trunk/octave-forge/main/vrml/inst/vrml_frame.m 2012-04-16 09:35:51 UTC (rev 10238) @@ -47,17 +47,9 @@ ###################################################################### ## Read options numeric_args = 0; -<<<<<<< .mine args = nargin; # nargin is now a function while args && numeric_args<2 && numeric_args<numel(varargin) tmp = varargin{numeric_args + 1}; -======= -args = nargin; # nargin is now a function -while args && numeric_args<2, - - - tmp = varargin{numeric_args + 1}; ->>>>>>> .r10218 if ischar (tmp), break; end --args; numeric_args++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-16 09:34:17
|
Revision: 10237 http://octave.svn.sourceforge.net/octave/?rev=10237&view=rev Author: carandraug Date: 2012-04-16 09:34:06 +0000 (Mon, 16 Apr 2012) Log Message: ----------- vrml: package is dependent on linear-algebra because of calls to rotparams Modified Paths: -------------- trunk/octave-forge/main/vrml/DESCRIPTION trunk/octave-forge/main/vrml/NEWS Modified: trunk/octave-forge/main/vrml/DESCRIPTION =================================================================== --- trunk/octave-forge/main/vrml/DESCRIPTION 2012-04-16 09:01:20 UTC (rev 10236) +++ trunk/octave-forge/main/vrml/DESCRIPTION 2012-04-16 09:34:06 UTC (rev 10237) @@ -5,7 +5,7 @@ Maintainer: Etienne Grossmann <et...@eg...> Title: VRML. Description: 3D graphics using VRML -Depends: octave (>= 2.9.7), miscellaneous, struct, statistics +Depends: octave (>= 2.9.7), linear-algebra, miscellaneous, struct, statistics Autoload: no SystemRequirements: freewrl License: GPLv3+, GFDL Modified: trunk/octave-forge/main/vrml/NEWS =================================================================== --- trunk/octave-forge/main/vrml/NEWS 2012-04-16 09:01:20 UTC (rev 10236) +++ trunk/octave-forge/main/vrml/NEWS 2012-04-16 09:34:06 UTC (rev 10237) @@ -21,3 +21,9 @@ ** Some bug fixes on the function `vrml_cyl' and `vrml_material' to handles colors correctly + + ** Package is no longer automatically loaded. + + ** The `linear-algebra' package is now a dependecy (altough not listed, + previous releases of `vrml' were also dependent on it so this is a + bugfix). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-16 09:01:32
|
Revision: 10236 http://octave.svn.sourceforge.net/octave/?rev=10236&view=rev Author: carandraug Date: 2012-04-16 09:01:20 +0000 (Mon, 16 Apr 2012) Log Message: ----------- maint: update e-mail address of Etienne Grossmann to <et...@eg...> as requested by himself Modified Paths: -------------- trunk/octave-forge/AUTHORS trunk/octave-forge/admin/find_changes trunk/octave-forge/extra/gnuplot/inst/myimage.m trunk/octave-forge/main/image/inst/bwborder.m trunk/octave-forge/main/linear-algebra/inst/rotparams.m trunk/octave-forge/main/linear-algebra/inst/rotv.m trunk/octave-forge/main/miscellaneous/inst/nze.m trunk/octave-forge/main/miscellaneous/inst/read_options.m trunk/octave-forge/main/miscellaneous/inst/slurp_file.m trunk/octave-forge/main/miscellaneous/inst/temp_name.m trunk/octave-forge/main/optim/doc/optim-mini-howto-2.lyx trunk/octave-forge/main/optim/doc/optim-mini-howto-2.tex trunk/octave-forge/main/optim/inst/__bracket_min.m trunk/octave-forge/main/optim/inst/__poly_2_extrema.m trunk/octave-forge/main/optim/inst/__semi_bracket.m trunk/octave-forge/main/optim/inst/cdiff.m trunk/octave-forge/main/optim/inst/cg_min.m trunk/octave-forge/main/optim/inst/d2_min.m trunk/octave-forge/main/optim/inst/fminunc_compat.m trunk/octave-forge/main/optim/inst/line_min.m trunk/octave-forge/main/optim/inst/minimize.m trunk/octave-forge/main/optim/inst/nelder_mead_min.m trunk/octave-forge/main/optim/inst/optimset_compat.m trunk/octave-forge/main/optim/inst/test_d2_min_1.m trunk/octave-forge/main/optim/inst/test_d2_min_2.m trunk/octave-forge/main/optim/inst/test_d2_min_3.m trunk/octave-forge/main/optim/inst/test_fminunc_1.m trunk/octave-forge/main/optim/inst/test_min_1.m trunk/octave-forge/main/optim/inst/test_min_2.m trunk/octave-forge/main/optim/inst/test_min_3.m trunk/octave-forge/main/optim/inst/test_min_4.m trunk/octave-forge/main/optim/inst/test_minimize_1.m trunk/octave-forge/main/optim/inst/test_nelder_mead_min_1.m trunk/octave-forge/main/optim/inst/test_nelder_mead_min_2.m trunk/octave-forge/main/struct/DESCRIPTION trunk/octave-forge/main/struct/inst/getfields.m trunk/octave-forge/main/struct/inst/setfields.m trunk/octave-forge/main/struct/inst/tars.m trunk/octave-forge/main/struct/inst/test_struct.m trunk/octave-forge/main/vrml/DESCRIPTION trunk/octave-forge/main/vrml/doc/vrml-mini-howto-1.lyx trunk/octave-forge/main/vrml/doc/vrml-mini-howto-1.tex trunk/octave-forge/main/vrml/inst/best_dir.m trunk/octave-forge/main/vrml/inst/best_dir_cov.m trunk/octave-forge/main/vrml/inst/bound_convex.m trunk/octave-forge/main/vrml/inst/checker_color.m trunk/octave-forge/main/vrml/inst/proplan.m trunk/octave-forge/main/vrml/inst/save_vrml.m trunk/octave-forge/main/vrml/inst/test_moving_surf.m trunk/octave-forge/main/vrml/inst/test_vmesh.m trunk/octave-forge/main/vrml/inst/test_vrml_faces.m trunk/octave-forge/main/vrml/inst/vmesh.m trunk/octave-forge/main/vrml/inst/vrml_Background.m trunk/octave-forge/main/vrml/inst/vrml_Box.m trunk/octave-forge/main/vrml/inst/vrml_DirectionalLight.m trunk/octave-forge/main/vrml/inst/vrml_PointLight.m trunk/octave-forge/main/vrml/inst/vrml_ROUTE.m trunk/octave-forge/main/vrml/inst/vrml_Sphere.m trunk/octave-forge/main/vrml/inst/vrml_TimeSensor.m trunk/octave-forge/main/vrml/inst/vrml_Viewpoint.m trunk/octave-forge/main/vrml/inst/vrml_anim.m trunk/octave-forge/main/vrml/inst/vrml_arrow.m trunk/octave-forge/main/vrml/inst/vrml_browse.m trunk/octave-forge/main/vrml/inst/vrml_cyl.m trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_1.m trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_2.m trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_3.m trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_4.m trunk/octave-forge/main/vrml/inst/vrml_ellipsoid.m trunk/octave-forge/main/vrml/inst/vrml_faces.m trunk/octave-forge/main/vrml/inst/vrml_flatten.m trunk/octave-forge/main/vrml/inst/vrml_frame.m trunk/octave-forge/main/vrml/inst/vrml_group.m trunk/octave-forge/main/vrml/inst/vrml_interp.m trunk/octave-forge/main/vrml/inst/vrml_kill.m trunk/octave-forge/main/vrml/inst/vrml_lines.m trunk/octave-forge/main/vrml/inst/vrml_material.m trunk/octave-forge/main/vrml/inst/vrml_newname.m trunk/octave-forge/main/vrml/inst/vrml_parallelepiped.m trunk/octave-forge/main/vrml/inst/vrml_parallelogram.m trunk/octave-forge/main/vrml/inst/vrml_points.m trunk/octave-forge/main/vrml/inst/vrml_surf.m trunk/octave-forge/main/vrml/inst/vrml_text.m trunk/octave-forge/main/vrml/inst/vrml_thick_surf.m trunk/octave-forge/main/vrml/inst/vrml_transfo.m Modified: trunk/octave-forge/AUTHORS =================================================================== --- trunk/octave-forge/AUTHORS 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/AUTHORS 2012-04-16 09:01:20 UTC (rev 10236) @@ -45,7 +45,7 @@ Dept of Probability Theory and Statistics TU Wien Eric Chassande-Mottin Eric Chassande-Mottin, CNRS (France) -Etienne Grossmann <et...@is...> +Etienne Grossmann <et...@eg...> FL <Fri...@ci...> Fabrice Bellard Francesco Potortì Modified: trunk/octave-forge/admin/find_changes =================================================================== --- trunk/octave-forge/admin/find_changes 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/admin/find_changes 2012-04-16 09:01:20 UTC (rev 10236) @@ -55,7 +55,7 @@ This file is distributed under the terms of the GNU General Public Licence. -=head1 AUTHOR Etienne Grossmann E<lt>et...@is...E<gt> +=head1 AUTHOR Etienne Grossmann E<lt>et...@eg...E<gt> =cut Modified: trunk/octave-forge/extra/gnuplot/inst/myimage.m =================================================================== --- trunk/octave-forge/extra/gnuplot/inst/myimage.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/extra/gnuplot/inst/myimage.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -54,7 +54,7 @@ ## ## FIXME: scl < 1 seems to be buggy -### Author Etienne Grossmann <et...@is...> +### Author Etienne Grossmann <et...@eg...> function im = myimage (im, varargin) ##viewer = "qiv"; # If I need to display image Modified: trunk/octave-forge/main/image/inst/bwborder.m =================================================================== --- trunk/octave-forge/main/image/inst/bwborder.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/image/inst/bwborder.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -23,7 +23,7 @@ ## neighbor that is not set. ## @end deftypefn -## Author: Etienne Grossmann <et...@is...> +## Author: Etienne Grossmann <et...@eg...> ## Last modified: January 2000 function b = bwborder(im) Modified: trunk/octave-forge/main/linear-algebra/inst/rotparams.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/rotparams.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/linear-algebra/inst/rotparams.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by the Modified: trunk/octave-forge/main/linear-algebra/inst/rotv.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/rotv.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/linear-algebra/inst/rotv.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by the Modified: trunk/octave-forge/main/miscellaneous/inst/nze.m =================================================================== --- trunk/octave-forge/main/miscellaneous/inst/nze.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/miscellaneous/inst/nze.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -19,7 +19,7 @@ ## Optionally, returns also linear indices. ## @end deftypefn -## Author: Etienne Grossmann <et...@is...> +## Author: Etienne Grossmann <et...@eg...> ## Author: Jaroslav Hajek <hi...@gm...> function [y, f] = nze (x) Modified: trunk/octave-forge/main/miscellaneous/inst/read_options.m =================================================================== --- trunk/octave-forge/main/miscellaneous/inst/read_options.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/miscellaneous/inst/read_options.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/miscellaneous/inst/slurp_file.m =================================================================== --- trunk/octave-forge/main/miscellaneous/inst/slurp_file.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/miscellaneous/inst/slurp_file.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/miscellaneous/inst/temp_name.m =================================================================== --- trunk/octave-forge/main/miscellaneous/inst/temp_name.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/miscellaneous/inst/temp_name.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/doc/optim-mini-howto-2.lyx =================================================================== (Binary files differ) Modified: trunk/octave-forge/main/optim/doc/optim-mini-howto-2.tex =================================================================== --- trunk/octave-forge/main/optim/doc/optim-mini-howto-2.tex 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/doc/optim-mini-howto-2.tex 2012-04-16 09:01:20 UTC (rev 10236) @@ -79,7 +79,7 @@ \title{Mini-HOWTO on using Octave for Unconstrained Nonlinear Optimization% -\thanks{Author : Etienne Grossmann \texttt{<et...@is...>} (soon +\thanks{Author : Etienne Grossmann \texttt{<et...@eg...>} (soon replaced by {}``Octave-Forge developers''?). This document is free documentation; you can redistribute it and/or modify it under the terms of the GNU Free Documentation License as published by the Free Modified: trunk/octave-forge/main/optim/inst/__bracket_min.m =================================================================== --- trunk/octave-forge/main/optim/inst/__bracket_min.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/__bracket_min.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## Copyright (C) 2009 Levente Torok <Tor...@gm...> ## ## This program is free software; you can redistribute it and/or modify it under Modified: trunk/octave-forge/main/optim/inst/__poly_2_extrema.m =================================================================== --- trunk/octave-forge/main/optim/inst/__poly_2_extrema.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/__poly_2_extrema.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## Copyright (C) 2009 Levente Torok <Tor...@gm...> ## ## This program is free software; you can redistribute it and/or modify it under Modified: trunk/octave-forge/main/optim/inst/__semi_bracket.m =================================================================== --- trunk/octave-forge/main/optim/inst/__semi_bracket.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/__semi_bracket.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## Copyright (C) 2009 Levente Torok <Tor...@gm...> ## ## This program is free software; you can redistribute it and/or modify it under Modified: trunk/octave-forge/main/optim/inst/cdiff.m =================================================================== --- trunk/octave-forge/main/optim/inst/cdiff.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/cdiff.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/cg_min.m =================================================================== --- trunk/octave-forge/main/optim/inst/cg_min.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/cg_min.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## Copyright (C) 2009 Levente Torok <Tor...@gm...> ## ## This program is free software; you can redistribute it and/or modify it under Modified: trunk/octave-forge/main/optim/inst/d2_min.m =================================================================== --- trunk/octave-forge/main/optim/inst/d2_min.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/d2_min.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/fminunc_compat.m =================================================================== --- trunk/octave-forge/main/optim/inst/fminunc_compat.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/fminunc_compat.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/line_min.m =================================================================== --- trunk/octave-forge/main/optim/inst/line_min.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/line_min.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,5 +1,5 @@ ## Copyright (C) 2000 Ben Sapp <bs...@la...> -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## Copyright (C) 2011 Nir Krakauer nkr...@cc... ## ## This program is free software; you can redistribute it and/or modify it under Modified: trunk/octave-forge/main/optim/inst/minimize.m =================================================================== --- trunk/octave-forge/main/optim/inst/minimize.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/minimize.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/nelder_mead_min.m =================================================================== --- trunk/octave-forge/main/optim/inst/nelder_mead_min.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/nelder_mead_min.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002-2008 Etienne Grossmann <et...@is...> +## Copyright (C) 2002-2008 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/optimset_compat.m =================================================================== --- trunk/octave-forge/main/optim/inst/optimset_compat.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/optimset_compat.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/test_d2_min_1.m =================================================================== --- trunk/octave-forge/main/optim/inst/test_d2_min_1.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/test_d2_min_1.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/test_d2_min_2.m =================================================================== --- trunk/octave-forge/main/optim/inst/test_d2_min_2.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/test_d2_min_2.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/test_d2_min_3.m =================================================================== --- trunk/octave-forge/main/optim/inst/test_d2_min_3.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/test_d2_min_3.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/test_fminunc_1.m =================================================================== --- trunk/octave-forge/main/optim/inst/test_fminunc_1.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/test_fminunc_1.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/test_min_1.m =================================================================== --- trunk/octave-forge/main/optim/inst/test_min_1.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/test_min_1.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## Copyright (C) 2004 Michael Creel <mic...@ua...> ## ## This program is free software; you can redistribute it and/or modify it under Modified: trunk/octave-forge/main/optim/inst/test_min_2.m =================================================================== --- trunk/octave-forge/main/optim/inst/test_min_2.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/test_min_2.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## Copyright (C) 2004 Michael Creel <mic...@ua...> ## ## This program is free software; you can redistribute it and/or modify it under Modified: trunk/octave-forge/main/optim/inst/test_min_3.m =================================================================== --- trunk/octave-forge/main/optim/inst/test_min_3.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/test_min_3.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## Copyright (C) 2004 Michael Creel <mic...@ua...> ## ## This program is free software; you can redistribute it and/or modify it under Modified: trunk/octave-forge/main/optim/inst/test_min_4.m =================================================================== --- trunk/octave-forge/main/optim/inst/test_min_4.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/test_min_4.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/test_minimize_1.m =================================================================== --- trunk/octave-forge/main/optim/inst/test_minimize_1.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/test_minimize_1.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/test_nelder_mead_min_1.m =================================================================== --- trunk/octave-forge/main/optim/inst/test_nelder_mead_min_1.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/test_nelder_mead_min_1.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/optim/inst/test_nelder_mead_min_2.m =================================================================== --- trunk/octave-forge/main/optim/inst/test_nelder_mead_min_2.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/optim/inst/test_nelder_mead_min_2.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/struct/DESCRIPTION =================================================================== --- trunk/octave-forge/main/struct/DESCRIPTION 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/struct/DESCRIPTION 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,7 +1,7 @@ Name: Struct Version: 1.0.10 Date: 2012-03-25 -Author: Etienne Grossmann <et...@is...>, Olaf Till <i7...@t-...> +Author: Etienne Grossmann <et...@eg...>, Olaf Till <i7...@t-...> Maintainer: Olaf Till <i7...@t-...> Title: Structure Handling. Description: Additional Structure manipulations functions. Modified: trunk/octave-forge/main/struct/inst/getfields.m =================================================================== --- trunk/octave-forge/main/struct/inst/getfields.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/struct/inst/getfields.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2000 Etienne Grossmann <et...@is...> +## Copyright (C) 2000 Etienne Grossmann <et...@eg...> ## Copyright (C) 2012 Olaf Till <i7...@t-...> ## ## This program is free software; you can redistribute it and/or modify it under Modified: trunk/octave-forge/main/struct/inst/setfields.m =================================================================== --- trunk/octave-forge/main/struct/inst/setfields.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/struct/inst/setfields.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2000 Etienne Grossmann <et...@is...> +## Copyright (C) 2000 Etienne Grossmann <et...@eg...> ## Copyright (C) 2000 Paul Kienzle <pki...@us...> ## Copyright (C) 2012 Olaf Till <i7...@t-...> ## Modified: trunk/octave-forge/main/struct/inst/tars.m =================================================================== --- trunk/octave-forge/main/struct/inst/tars.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/struct/inst/tars.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2000 Etienne Grossmann <et...@is...> +## Copyright (C) 2000 Etienne Grossmann <et...@eg...> ## Copyright (C) 2012 Olaf Till <i7...@t-...> ## ## This program is free software; you can redistribute it and/or modify it under Modified: trunk/octave-forge/main/struct/inst/test_struct.m =================================================================== --- trunk/octave-forge/main/struct/inst/test_struct.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/struct/inst/test_struct.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2000 Etienne Grossmann <et...@is...> +## Copyright (C) 2000 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/DESCRIPTION =================================================================== --- trunk/octave-forge/main/vrml/DESCRIPTION 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/DESCRIPTION 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,8 +1,8 @@ Name: Vrml Version: 1.0.12 Date: 2010-04-11 -Author: Etienne Grossmann <et...@is...> -Maintainer: Etienne Grossmann <et...@is...> +Author: Etienne Grossmann <et...@eg...> +Maintainer: Etienne Grossmann <et...@eg...> Title: VRML. Description: 3D graphics using VRML Depends: octave (>= 2.9.7), miscellaneous, struct, statistics Modified: trunk/octave-forge/main/vrml/doc/vrml-mini-howto-1.lyx =================================================================== (Binary files differ) Modified: trunk/octave-forge/main/vrml/doc/vrml-mini-howto-1.tex =================================================================== --- trunk/octave-forge/main/vrml/doc/vrml-mini-howto-1.tex 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/doc/vrml-mini-howto-1.tex 2012-04-16 09:01:20 UTC (rev 10236) @@ -80,7 +80,7 @@ \title{Mini-HOWTO : visualizing 3D data using Octave, VRML and FreeWRL% -\thanks{Author : Etienne Grossmann \texttt{<et...@is...>} (soon +\thanks{Author : Etienne Grossmann \texttt{<et...@eg...>} (soon replaced by {}``Octave-Forge developers''?). This document is free documentation; you can redistribute it and/or modify it under the terms of the GNU Free Documentation License as published by the Free Modified: trunk/octave-forge/main/vrml/inst/best_dir.m =================================================================== --- trunk/octave-forge/main/vrml/inst/best_dir.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/best_dir.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software @@ -66,7 +66,7 @@ ## wx : (D+W)x(D*P) ## Derivatives of [w;d] wrt to x. ## -## Author : Etienne Grossmann <et...@is...> +## Author : Etienne Grossmann <et...@eg...> ## Created : March 2000 ## function [d,w,rx,cv,wx] = best_dir( x, a, sx ) Modified: trunk/octave-forge/main/vrml/inst/best_dir_cov.m =================================================================== --- trunk/octave-forge/main/vrml/inst/best_dir_cov.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/best_dir_cov.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software @@ -26,7 +26,7 @@ ## wx (W+D)x(P*D) : derivatives of ML estimate wrt to observations ## -## Author: Etienne Grossmann <et...@is...> +## Author: Etienne Grossmann <et...@eg...> ## Last modified: Setembro 2002 function [cv,wx] = best_dir_cov(x,a,sx,wd) Modified: trunk/octave-forge/main/vrml/inst/bound_convex.m =================================================================== --- trunk/octave-forge/main/vrml/inst/bound_convex.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/bound_convex.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software @@ -19,7 +19,7 @@ ## in the plane d*y == v. The corners are sorted. ## -## Author: Etienne Grossmann <et...@is...> +## Author: Etienne Grossmann <et...@eg...> function y = bound_convex(d,h,x,pad) Modified: trunk/octave-forge/main/vrml/inst/checker_color.m =================================================================== --- trunk/octave-forge/main/vrml/inst/checker_color.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/checker_color.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2010 Etienne Grossmann <et...@is...> +## Copyright (C) 2010 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/proplan.m =================================================================== --- trunk/octave-forge/main/vrml/inst/proplan.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/proplan.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/save_vrml.m =================================================================== --- trunk/octave-forge/main/vrml/inst/save_vrml.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/save_vrml.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/test_moving_surf.m =================================================================== --- trunk/octave-forge/main/vrml/inst/test_moving_surf.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/test_moving_surf.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2005 Etienne Grossmann <et...@is...> +## Copyright (C) 2005 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/test_vmesh.m =================================================================== --- trunk/octave-forge/main/vrml/inst/test_vmesh.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/test_vmesh.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/test_vrml_faces.m =================================================================== --- trunk/octave-forge/main/vrml/inst/test_vrml_faces.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/test_vrml_faces.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vmesh.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vmesh.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vmesh.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002-2009 Etienne Grossmann <et...@is...> +## Copyright (C) 2002-2009 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_Background.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_Background.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_Background.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_Box.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_Box.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_Box.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2010 Etienne Grossmann <et...@is...> +## Copyright (C) 2010 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_DirectionalLight.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_DirectionalLight.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_DirectionalLight.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2005 Etienne Grossmann <et...@is...> +## Copyright (C) 2005 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_PointLight.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_PointLight.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_PointLight.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_ROUTE.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_ROUTE.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_ROUTE.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2005 Etienne Grossmann <et...@is...> +## Copyright (C) 2005 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_Sphere.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_Sphere.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_Sphere.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2010 Etienne Grossmann <et...@is...> +## Copyright (C) 2010 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_TimeSensor.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_TimeSensor.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_TimeSensor.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2005 Etienne Grossmann <et...@is...> +## Copyright (C) 2005 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_Viewpoint.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_Viewpoint.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_Viewpoint.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2010 Etienne Grossmann <et...@is...> +## Copyright (C) 2010 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_anim.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_anim.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_anim.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2005 Etienne Grossmann <et...@is...> +## Copyright (C) 2005 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_arrow.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_arrow.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_arrow.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002-2012 Etienne Grossmann. All rights reserved. +## Copyright (C) 2002-2012 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_browse.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_browse.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_browse.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_cyl.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_cyl.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_cyl.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_1.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_1.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_1.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002-2009 Etienne Grossmann <et...@is...> +## Copyright (C) 2002-2009 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_2.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_2.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_2.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_3.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_3.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_3.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_4.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_4.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_demo_tutorial_4.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002-2009 Etienne Grossmann <et...@is...> +## Copyright (C) 2002-2009 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_ellipsoid.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_ellipsoid.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_ellipsoid.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_faces.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_faces.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_faces.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_flatten.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_flatten.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_flatten.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_frame.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_frame.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_frame.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002-2012 Etienne Grossmann. All rights reserved. +## Copyright (C) 2002-2012 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_group.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_group.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_group.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_interp.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_interp.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_interp.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2005 Etienne Grossmann <et...@is...> +## Copyright (C) 2005 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_kill.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_kill.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_kill.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_lines.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_lines.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_lines.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_material.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_material.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_material.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_newname.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_newname.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_newname.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2005 Etienne Grossmann <et...@is...> +## Copyright (C) 2005 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_parallelepiped.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_parallelepiped.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_parallelepiped.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2007-2010 Etienne Grossmann <et...@is...> +## Copyright (C) 2007-2010 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_parallelogram.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_parallelogram.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_parallelogram.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2003 Etienne Grossmann <et...@is...> +## Copyright (C) 2003 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_points.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_points.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_points.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_surf.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_surf.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_surf.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002-2009 Etienne Grossmann <et...@is...> +## Copyright (C) 2002-2009 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_text.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_text.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_text.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_thick_surf.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_thick_surf.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_thick_surf.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software Modified: trunk/octave-forge/main/vrml/inst/vrml_transfo.m =================================================================== --- trunk/octave-forge/main/vrml/inst/vrml_transfo.m 2012-04-16 08:31:15 UTC (rev 10235) +++ trunk/octave-forge/main/vrml/inst/vrml_transfo.m 2012-04-16 09:01:20 UTC (rev 10236) @@ -1,4 +1,4 @@ -## Copyright (C) 2002 Etienne Grossmann <et...@is...> +## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-16 08:31:25
|
Revision: 10235 http://octave.svn.sourceforge.net/octave/?rev=10235&view=rev Author: jpicarbajal Date: 2012-04-16 08:31:15 +0000 (Mon, 16 Apr 2012) Log Message: ----------- geometry: Fixing PKG_ADD and PKG_DEL Modified Paths: -------------- trunk/octave-forge/main/geometry/INDEX trunk/octave-forge/main/geometry/PKG_ADD trunk/octave-forge/main/geometry/PKG_DEL trunk/octave-forge/main/geometry/inst/io/data2geo.m Modified: trunk/octave-forge/main/geometry/INDEX =================================================================== --- trunk/octave-forge/main/geometry/INDEX 2012-04-16 07:34:41 UTC (rev 10234) +++ trunk/octave-forge/main/geometry/INDEX 2012-04-16 08:31:15 UTC (rev 10235) @@ -125,7 +125,7 @@ shapecentroid shapeplot shapetransform - curvelval + curveval curve2polyline 2D Others bisector Modified: trunk/octave-forge/main/geometry/PKG_ADD =================================================================== --- trunk/octave-forge/main/geometry/PKG_ADD 2012-04-16 07:34:41 UTC (rev 10234) +++ trunk/octave-forge/main/geometry/PKG_ADD 2012-04-16 08:31:15 UTC (rev 10235) @@ -2,22 +2,35 @@ dirlist = {"geom2d","io","polygons2d","shape2d","octclip", "graphs"}; dirname = fileparts (canonicalize_file_name (mfilename ("fullpath"))); pp = strsplit (dirname,filesep (), true); - -%% Check if prefix was used -[pkg_folder dep_folder] = pkg ("prefix"); -pkg_folder = [pkg_folder filesep() strcat(filesep(),{pp{end-1:end}}){:} ]; -dep_folder = [dep_folder filesep() strcat(filesep(),{pp{end-1:end}}){:} ]; - -%% If we are in Architecture dependent folder add from outside arch = cstrcat (octave_config_info ("canonical_host_type"), "-", octave_config_info ("api_version")); -if strcmp (arch , pp{end}) - dirname = [strcat(filesep(),{pp{1:end-1}}){:}]; - pkg_folder = strsplit (pkg_folder,filesep (), true); - pkg_folder = [strcat(filesep(),{pkg_folder{1:end-1}}){:}]; + +%% Get the correct path +% Search installed packages +[local_packages, global_packages] = pkg("list"); +installed_pkgs_lst = {local_packages{:}, global_packages{:}}; +pkg_data = installed_pkgs_lst (cellfun(@(x) ismember (x.name, {"geometry"}), ... + installed_pkgs_lst, "unif", true)); +if isempty(pkg_data) + % The package is not installed yet + [pkg_folder dep_folder] = pkg ("prefix"); + pkg_folder = [pkg_folder strcat(filesep(),{pp{end-1:end}}){:} ]; +% dep_folder = [dep_folder strcat(filesep(),{pp{end-1:end}}){:} ]; + if strcmp (arch , pp{end}) + %% If we are in Architecture dependent folder add from outside + pkg_folder = strsplit (pkg_folder,filesep (), true); + pkg_folder = [strcat(filesep(),{pkg_folder{1:end-1}}){:}]; +% dep_folder = strsplit (dep_folder,filesep (), true); +% dep_folder = [strcat(filesep(),{dep_folder{1:end-1}}){:}]; + end +else + pkg_folder = pkg_data{1}.dir; +% dep_folder = pkg_data{1}.archprefix; end -if (! exist (fullfile (dirname, "inst"), "dir")) +%dep_folder = [dep_folder filesep arch]; + +if (! exist (fullfile (pkg_folder, "inst"), "dir")) %% Installing for ii=1:length (dirlist) addpath ( [ pkg_folder filesep() dirlist{ii}],"-end") @@ -27,9 +40,11 @@ %% Testing warning("geometry:Devel","Adding path for testing."); for ii=1:length(dirlist) - addpath ([ dirname "/inst/" dirlist{ii}]) + addpath ([ pkg_folder "/inst/" dirlist{ii}]) endfor endif +%addpath (dep_folder) warning('off', 'Octave:fopen-file-in-path'); -clear dirlist dirname pp arch pkg_folder dep_folder +clear dirlist dirname pp arch pkg_folder +%dep_folder Modified: trunk/octave-forge/main/geometry/PKG_DEL =================================================================== --- trunk/octave-forge/main/geometry/PKG_DEL 2012-04-16 07:34:41 UTC (rev 10234) +++ trunk/octave-forge/main/geometry/PKG_DEL 2012-04-16 08:31:15 UTC (rev 10235) @@ -2,28 +2,34 @@ dirlist = {"geom2d","io","polygons2d","shape2d","octclip","graphs"}; dirname = fileparts (canonicalize_file_name (mfilename ("fullpath"))); pp = strsplit (dirname,filesep (), true); - -%% Get the correct path -p1 = pkg_info ("miscellaneous", "archprefix"); -p2 = octave_config_info ("canonical_host_type"); -p2 = octave_config_info ("api_version"); -arch_dep_fldr = [p1 filesep "-" p3]; - -%[pkg_folder dep_folder] = pkg ("prefix"); -%pkg_folder = [pkg_folder filesep() strcat(filesep(),{pp{end-1:end}}){:} ]; -%dep_folder = [dep_folder filesep() strcat(filesep(),{pp{end-1:end}}){:} ]; - -%% If we are not in Architecture dependent folder arch = cstrcat (octave_config_info ("canonical_host_type"), "-", octave_config_info ("api_version")); -pp = strsplit (dirname,filesep (), true); -if strcmp(arch , pp{end}) - dirname = [pkg("prefix") filesep() pp{end-1}]; - pkg_folder = strsplit (pkg_folder,filesep (), true); - pkg_folder = [strcat(filesep(),{pkg_folder{1:end-1}}){:}]; +%% Get the correct path +% Search installed packages +[local_packages, global_packages] = pkg("list"); +installed_pkgs_lst = {local_packages{:}, global_packages{:}}; +pkg_data = installed_pkgs_lst (cellfun(@(x) ismember (x.name, {"geometry"}), ... + installed_pkgs_lst, "unif", true)); +if isempty(pkg_data) + % The package is not installed yet + [pkg_folder dep_folder] = pkg ("prefix"); + pkg_folder = [pkg_folder strcat(filesep(),{pp{end-1:end}}){:} ]; +% dep_folder = [dep_folder strcat(filesep(),{pp{end-1:end}}){:} ]; + if strcmp (arch , pp{end}) + %% If we are in Architecture dependent folder add from outside + pkg_folder = strsplit (pkg_folder,filesep (), true); + pkg_folder = [strcat(filesep(),{pkg_folder{1:end-1}}){:}]; +% dep_folder = strsplit (dep_folder,filesep (), true); +% dep_folder = [strcat(filesep(),{dep_folder{1:end-1}}){:}]; + end +else + pkg_folder = pkg_data{1}.dir; +% dep_folder = pkg_data{1}.archprefix; end -if (! exist (fullfile (dirname, "inst"), "dir")) +%dep_folder = [dep_folder filesep arch]; + +if (! exist (fullfile (pkg_folder, "inst"), "dir")) ## Run this if the package is installed for ii=1:length (dirlist) rmpath ( [ pkg_folder filesep() dirlist{ii}]) @@ -31,8 +37,10 @@ else warning("geometry:Devel","Removing path for testing."); for ii=1:length(dirlist) - rmpath ([ dirname "/inst/" dirlist{ii}]) + rmpath ([ pkg_folder "/inst/" dirlist{ii}]) endfor endif +%rmpath (dep_folder); -clear dirlist dirname pp arch pkg_folder dep_folder +clear dirlist dirname pp arch pkg_folder +%dep_folder Modified: trunk/octave-forge/main/geometry/inst/io/data2geo.m =================================================================== --- trunk/octave-forge/main/geometry/inst/io/data2geo.m 2012-04-16 07:34:41 UTC (rev 10234) +++ trunk/octave-forge/main/geometry/inst/io/data2geo.m 2012-04-16 08:31:15 UTC (rev 10235) @@ -97,6 +97,7 @@ %! ids = dc.pathid(); %! P = dc.path2polygon(ids{1},12)(1:end-1,:); %! P = bsxfun(@minus, P, centroid(P)); +%! P = simplifypolygon(P,'tol',5e-1); %! filename = tmpnam (); %! meshsize = sqrt(mean(sumsq(diff(P,1,1),2)))/2; %! data2geo (P, meshsize, 'output', [filename '.geo']); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cde...@us...> - 2012-04-16 07:34:47
|
Revision: 10234 http://octave.svn.sourceforge.net/octave/?rev=10234&view=rev Author: cdemills Date: 2012-04-16 07:34:41 +0000 (Mon, 16 Apr 2012) Log Message: ----------- removed dir part for test file data_test.csv Modified Paths: -------------- trunk/octave-forge/extra/dataframe/inst/@dataframe/dataframe.m trunk/octave-forge/extra/dataframe/inst/@dataframe/private/df_matassign.m trunk/octave-forge/extra/dataframe/inst/dataframe Modified: trunk/octave-forge/extra/dataframe/inst/@dataframe/dataframe.m =================================================================== --- trunk/octave-forge/extra/dataframe/inst/@dataframe/dataframe.m 2012-04-15 17:01:26 UTC (rev 10233) +++ trunk/octave-forge/extra/dataframe/inst/@dataframe/dataframe.m 2012-04-16 07:34:41 UTC (rev 10234) @@ -290,7 +290,7 @@ 'UniformOutput', false); else %# this faster code requires a patch to src/file-io.cc in - %# main Octave tree + %# the main Octave tree the_line = sscanf (dummy, "%f", locales); the_line = cellfun (@(x) x{1}, the_line, \ 'UniformOutput', false); Modified: trunk/octave-forge/extra/dataframe/inst/@dataframe/private/df_matassign.m =================================================================== --- trunk/octave-forge/extra/dataframe/inst/@dataframe/private/df_matassign.m 2012-04-15 17:01:26 UTC (rev 10233) +++ trunk/octave-forge/extra/dataframe/inst/@dataframe/private/df_matassign.m 2012-04-16 07:34:41 UTC (rev 10234) @@ -280,7 +280,7 @@ endfor indi = nrow; while (indi > 0) - if (1 == eff_len(indi)) + if (eff_len(indi) < ncol) nrow = nrow - 1; indr(end) = []; RHS(end, :) = []; @@ -295,7 +295,7 @@ endwhile clear eff_len; endif - + %# the real assignement if (1 == size (RHS, 1)) %# each cell contains one vector fillfunc = @(x) RHS{x}; Modified: trunk/octave-forge/extra/dataframe/inst/dataframe =================================================================== --- trunk/octave-forge/extra/dataframe/inst/dataframe 2012-04-15 17:01:26 UTC (rev 10233) +++ trunk/octave-forge/extra/dataframe/inst/dataframe 2012-04-16 07:34:41 UTC (rev 10234) @@ -10,7 +10,7 @@ %!assert(isempty(x.rowidx), false); %! x.types(2) ='single'; %!assert(class(x.array(1, 2)), 'single') -%! x=dataframe('octave_frame/data_test.csv'); +%! x=dataframe('data_test.csv'); %!assert(isna(x.array(9, 4))) %! # remove rownames %! x.rownames = []; @@ -177,7 +177,7 @@ %!assert(z.array, y(y)); %!demo -%! x=dataframe('octave_frame/data_test.csv') +%! x=dataframe('data_test.csv') %! disp("Access as a struct: x.VBIAS(1:6)") %! x.VBIAS(1:6) %! pause; disp("Access as a matrix: x(6, 'OK')") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-15 17:01:32
|
Revision: 10233 http://octave.svn.sourceforge.net/octave/?rev=10233&view=rev Author: jpicarbajal Date: 2012-04-15 17:01:26 +0000 (Sun, 15 Apr 2012) Log Message: ----------- geometry: Bumping version Modified Paths: -------------- trunk/octave-forge/main/geometry/DESCRIPTION trunk/octave-forge/main/geometry/NEWS Modified: trunk/octave-forge/main/geometry/DESCRIPTION =================================================================== --- trunk/octave-forge/main/geometry/DESCRIPTION 2012-04-15 16:42:01 UTC (rev 10232) +++ trunk/octave-forge/main/geometry/DESCRIPTION 2012-04-15 17:01:26 UTC (rev 10233) @@ -1,6 +1,6 @@ Name: Geometry -Version: 1.4.2 -Date: 2012-XX-XX +Version: 1.5.0 +Date: 2012-04-15 Author: David Legland <dav...@gr...>, José Luis García Pallero <jgp...@gm...>, Juan Pablo Carbajal <car...@if...> Maintainer: Juan Pablo Carbajal <car...@if...> Title: Computational Geometry Modified: trunk/octave-forge/main/geometry/NEWS =================================================================== --- trunk/octave-forge/main/geometry/NEWS 2012-04-15 16:42:01 UTC (rev 10232) +++ trunk/octave-forge/main/geometry/NEWS 2012-04-15 17:01:26 UTC (rev 10233) @@ -1,7 +1,7 @@ Summary of important user-visible changes for releases of the geometry package =============================================================================== -geometry-1.5.0 Release Date: 2012-XX-XX Release Manager: Juan Pablo Carbajal +geometry-1.5.0 Release Date: 2012-04-15 Release Manager: Juan Pablo Carbajal =============================================================================== * Added functions: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-15 16:42:08
|
Revision: 10232 http://octave.svn.sourceforge.net/octave/?rev=10232&view=rev Author: jpicarbajal Date: 2012-04-15 16:42:01 +0000 (Sun, 15 Apr 2012) Log Message: ----------- geometry: updating all functions related to polygon simplification Modified Paths: -------------- trunk/octave-forge/main/geometry/INDEX trunk/octave-forge/main/geometry/NEWS trunk/octave-forge/main/geometry/inst/geom2d/distancePointEdge.m trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m trunk/octave-forge/main/geometry/inst/shape2d/curve2polyline.m trunk/octave-forge/main/geometry/inst/shape2d/shape2polygon.m trunk/octave-forge/main/geometry/inst/shape2d/shapeplot.m Modified: trunk/octave-forge/main/geometry/INDEX =================================================================== --- trunk/octave-forge/main/geometry/INDEX 2012-04-15 15:27:04 UTC (rev 10231) +++ trunk/octave-forge/main/geometry/INDEX 2012-04-15 16:42:01 UTC (rev 10232) @@ -117,6 +117,7 @@ 2D Polygons drawPolygon simplifypolygon + simplifypolyline oc_polybool 2D Piecewise polynomial shapes polygon2shape Modified: trunk/octave-forge/main/geometry/NEWS =================================================================== --- trunk/octave-forge/main/geometry/NEWS 2012-04-15 15:27:04 UTC (rev 10231) +++ trunk/octave-forge/main/geometry/NEWS 2012-04-15 16:42:01 UTC (rev 10232) @@ -1,7 +1,7 @@ Summary of important user-visible changes for releases of the geometry package =============================================================================== -geometry-1.4.2 Release Date: 2012-XX-XX Release Manager: Juan Pablo Carbajal +geometry-1.5.0 Release Date: 2012-XX-XX Release Manager: Juan Pablo Carbajal =============================================================================== * Added functions: Modified: trunk/octave-forge/main/geometry/inst/geom2d/distancePointEdge.m =================================================================== --- trunk/octave-forge/main/geometry/inst/geom2d/distancePointEdge.m 2012-04-15 15:27:04 UTC (rev 10231) +++ trunk/octave-forge/main/geometry/inst/geom2d/distancePointEdge.m 2012-04-15 16:42:01 UTC (rev 10232) @@ -32,8 +32,8 @@ %% -*- texinfo -*- %% @deftypefn {Function File} {@var{dist} = } distancePointEdge (@var{point}, @var{edge}) -%% @deftypefnx {Function File} {@var{dist} = } distancePointEdge (@dots, @var{opt}) -%% @deftypefnx {Function File} {[@var{dist} @var{pos}]= } distancePointEdge (@dots) +%% @deftypefnx {Function File} {@var{dist} = } distancePointEdge (@dots{}, @var{opt}) +%% @deftypefnx {Function File} {[@var{dist} @var{pos}]= } distancePointEdge (@dots{}) %% Minimum distance between a point and an edge %% %% Return the euclidean distance between edge @var{edge} and point @var{point}. Modified: trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m =================================================================== --- trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m 2012-04-15 15:27:04 UTC (rev 10231) +++ trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m 2012-04-15 16:42:01 UTC (rev 10232) @@ -27,7 +27,7 @@ %% @strong{Parameters} %% @table @samp %% @item 'Nmax' -%% Maximum number of vertices. Default value @code{100}. +%% Maximum number of vertices. Default value @code{1e3}. %% @item 'Tol' %% Tolerance for the error criteria. Default value @code{1e-4}. %% @item 'MaxIter' @@ -47,7 +47,7 @@ # --- Parse arguments --- # parser = inputParser (); parser.FunctionName = "simplifypolyline"; - parser = addParamValue (parser,'Nmax', 100, @(x)x>0); + parser = addParamValue (parser,'Nmax', 1e3, @(x)x>0); toldef = 1e-4;%max(sumsq(diff(pline_o),2))*2; parser = addParamValue (parser,'Tol', toldef, @(x)x>0); parser = addParamValue (parser,'MaxIter', 100, @(x)x>0); @@ -58,8 +58,8 @@ MaxIter = parser.Results.MaxIter; clear parser toldef - msg = ["Maximum number of points reached with maximal error %g." ... - " Increase '%s' if the result is not satisfactory."]; + msg = ["simplifypolyline: Maximum number of points reached with maximum error %g." ... + " Increase %s if the result is not satisfactory."]; # ------ # [N dim] = size(pline_o); @@ -79,13 +79,14 @@ idx = sort(idx); if length(idx) >= Nmax - warning('geometry:MayBeWrongOutput', sprintf(msg,dist,'Nmax')); + %% TODO remove extra points + warning('geometry:MayBeWrongOutput', sprintf(msg,max(dist),'Nmax')); break; end end if iter == MaxIter - warning('geometry:MayBeWrongOutput', sprintf(msg,dist,'MaxIter')); + warning('geometry:MayBeWrongOutput', sprintf(msg,max(dist),'MaxIter')); end pline = pline_o(idx,:); Modified: trunk/octave-forge/main/geometry/inst/shape2d/curve2polyline.m =================================================================== --- trunk/octave-forge/main/geometry/inst/shape2d/curve2polyline.m 2012-04-15 15:27:04 UTC (rev 10231) +++ trunk/octave-forge/main/geometry/inst/shape2d/curve2polyline.m 2012-04-15 16:42:01 UTC (rev 10232) @@ -15,7 +15,7 @@ %% -*- texinfo -*- %% @deftypefn {Function File} {@var{polyline} = } curve2polyline (@var{curve}) -%% @deftypefnx {Function File} {@var{polyline} = } curve2polyline (@dots,@var{property},@var{value},@dots) +%% @deftypefnx {Function File} {@var{polyline} = } curve2polyline (@dots{},@var{property},@var{value},@dots{}) %% Adaptive sampling of a parametric curve. %% %% The @var{curve} is described as a 2-by-N matrix. Rows correspond to the @@ -45,6 +45,7 @@ %% Thursday, April 12 2012 -- JuanPi function [polyline t bump]= curve2polyline (curve, varargin) +%% TODO make tolerance relative to the "diameter" of the curve. # --- Parse arguments --- # parser = inputParser (); @@ -58,7 +59,7 @@ tol = parser.Results.Tol; MaxIter = parser.Results.MaxIter; - clear parser + clear parser toldef # ------ # t = [0; 1]; Modified: trunk/octave-forge/main/geometry/inst/shape2d/shape2polygon.m =================================================================== --- trunk/octave-forge/main/geometry/inst/shape2d/shape2polygon.m 2012-04-15 15:27:04 UTC (rev 10231) +++ trunk/octave-forge/main/geometry/inst/shape2d/shape2polygon.m 2012-04-15 16:42:01 UTC (rev 10232) @@ -15,25 +15,23 @@ %% -*- texinfo -*- %% @deftypefn {Function File} {@var{polygon} = } shape2polygon (@var{shape}) -%% @deftypefnx {Function File} {@var{polygon} = } shape2polygon (@var{shape},@var{N}) +%% @deftypefnx {Function File} {@var{polygon} = } shape2polygon (@dots{},@var{property},@var{value},@dots{}) %% Transforms a 2D shape described by piecewise smooth polynomials into a polygon. %% %% @var{shape} is a n-by-1 cell where each element is a pair of polynomials %% compatible with polyval. %% @var{polygon} is a k-by-2 matrix, where each row represents a vertex. -%% @var{N} defines the number of points to be used in non-straight edges. +%% The property-value pairs are passed to @code{curve2polyline}. %% -%% @seealso{polygon2shape, drawPolygon} +%% @seealso{polygon2shape, curve2poyline} %% @end deftypefn -function polygon = shape2polygon (shape, N=16) +function polygon = shape2polygon (shape, varargin) polygon = cell2mat ( ... - cellfun (@(x) func (x,N), shape,'UniformOutput',false) ); + cellfun (@(x) curve2polyline(x,varargin{:}), shape,'UniformOutput',false) ); + polygon = simplifypolygon(polygon); - %% TODO simply the polygon based on curvature -% polygon = unique (polygon, 'rows'); - if size (polygon, 1) == 1 polygon(2,1) = polyval (shape{1}(1,:), 1); polygon(2,2) = polyval (shape{1}(2,:), 1); @@ -41,14 +39,27 @@ endfunction -function y = func (x,N) - - if size (x,2) > 2 - t = linspace (0,1-1/N,N).'; - y(:,1) = polyval (x(1,:), t); - y(:,2) = polyval (x(2,:), t); - else - y = x(:,2).'; - end - -endfunction +%!demo +%! shape = {[-93.172 606.368 -476.054 291.429; ... +%! -431.196 637.253 11.085 163.791]; ... +%! [-75.3626 -253.2337 457.1678 328.5714; ... +%! 438.7659 -653.6278 -7.9953 380.9336]; ... +%! [-89.5841 344.9716 -275.3876 457.1429; ... +%! -170.3613 237.8858 1.0469 158.0765];... +%! [32.900 -298.704 145.804 437.143; ... +%! -243.903 369.597 -34.265 226.648]; ... +%! [-99.081 409.127 -352.903 317.143; ... +%! 55.289 -114.223 -26.781 318.076]; ... +%! [-342.231 191.266 168.108 274.286; ... +%! 58.870 -38.083 -89.358 232.362]}; +%! +%! % Estimate a good tolerance +%! n = cell2mat(cellfun(@(x)curveval(x,[0 1]), shape, 'uniformoutput',false)); +%! dr = (max(n(:,1))-min(n(:,1)))*(max(n(:,2))-min(n(:,2)))*40; +%! p = shape2polygon (shape,'tol',dr); +%! +%! figure(1) +%! shapeplot(shape,'-b'); +%! hold on; +%! drawPolygon (p,'-or'); +%! hold off Modified: trunk/octave-forge/main/geometry/inst/shape2d/shapeplot.m =================================================================== --- trunk/octave-forge/main/geometry/inst/shape2d/shapeplot.m 2012-04-15 15:27:04 UTC (rev 10231) +++ trunk/octave-forge/main/geometry/inst/shape2d/shapeplot.m 2012-04-15 16:42:01 UTC (rev 10232) @@ -27,9 +27,11 @@ %% @seealso{drawPolygon, shape2polygon} %% @end deftypefn -function h = shapeplot(shape, N = 16, varargin) +function h = shapeplot(shape, varargin) - p = shape2polygon(shape, N); + n = cell2mat(cellfun(@(x)curveval(x,[0 1]), shape, 'uniformoutput',false)); + dr = (max(n(:,1))-min(n(:,1)))*(max(n(:,2))-min(n(:,2)))/10; + p = shape2polygon(shape,'tol', dr); h = drawPolygon(p,varargin{:}); endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-15 15:27:10
|
Revision: 10231 http://octave.svn.sourceforge.net/octave/?rev=10231&view=rev Author: jpicarbajal Date: 2012-04-15 15:27:04 +0000 (Sun, 15 Apr 2012) Log Message: ----------- geometry: Ramer-Douglas-Peucker algorithm to simplify polylines and polygons. Modified Paths: -------------- trunk/octave-forge/main/geometry/NEWS Modified: trunk/octave-forge/main/geometry/NEWS =================================================================== --- trunk/octave-forge/main/geometry/NEWS 2012-04-15 15:22:55 UTC (rev 10230) +++ trunk/octave-forge/main/geometry/NEWS 2012-04-15 15:27:04 UTC (rev 10231) @@ -15,8 +15,8 @@ and all edges. A third optional argument provides backward compatibility. -* Known issues - - simplifypolygon.m returns empty polygons when points are repeated, i.e when +* Solved bugs: + - simplifypolygon.m returned empty polygons when points are repeated, i.e when the polygon is not correctly formed. =============================================================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-15 15:23:02
|
Revision: 10230 http://octave.svn.sourceforge.net/octave/?rev=10230&view=rev Author: jpicarbajal Date: 2012-04-15 15:22:55 +0000 (Sun, 15 Apr 2012) Log Message: ----------- geometry: Ramer-Douglas-Peucker algorithm to simplify polylines and polygons. Modified Paths: -------------- trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolygon.m trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m trunk/octave-forge/main/geometry/inst/shape2d/curve2polyline.m Modified: trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolygon.m =================================================================== --- trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolygon.m 2012-04-15 15:18:34 UTC (rev 10229) +++ trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolygon.m 2012-04-15 15:22:55 UTC (rev 10230) @@ -15,37 +15,32 @@ %% -*- texinfo -*- %% @deftypefn {Function File} {@var{spoly} = } simplifypolygon (@var{poly}) -%% Filter colinear vertex from a 2D polygon. +%% Simplify a polygon using the Ramer-Douglas-Peucker algorithm. %% %% @var{poly} is a N-by-2 matrix, each row representing a vertex. %% -%% @seealso{shape2polygon} +%% @seealso{simplifypolyline, shape2polygon} %% @end deftypefn -function polygonsimp = simplifypolygon (polygon) +function polygonsimp = simplifypolygon (polygon, varargin) - # Filter colinear points - edges = diff(polygon([1:end 1],:)); - ned = size(edges,1); - nxt = [2:ned 1]; + polygonsimp = simplifypolyline (polygon,varargin{:}); - # check if consecutive edges are parallel - para = edges(:,1).*edges(nxt,2) - edges(:,2).*edges(nxt,1); - ind = abs(para) > sqrt(eps); + # Remove parrallel consecutive edges + PL = polygonsimp(1:end-1,:); + PC = polygonsimp(2:end,:); + PR = polygonsimp([3:end 1],:); + a = PL - PC; + b = PR - PC; + tf = find(isParallel(a,b))+1; + polygonsimp (tf,:) = []; - polygonsimp = polygon(circshift (ind,1),:); - - if isempty(polygonsimp) - warning('simplifypolygon:devel',"The simplification gives an empty polygon. Returning original\n"); - polygonsimp = polygon; - end - endfunction %!test %! P = [0 0; 1 0; 0 1]; %! P2 = [0 0; 0.1 0; 0.2 0; 0.25 0; 1 0; 0 1; 0 0.7; 0 0.6; 0 0.3; 0 0.1]; -%! assert(P,simplifypolygon (P2)) +%! assert(simplifypolygon (P2),P,min(P2(:))*eps) %!demo %! Modified: trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m =================================================================== --- trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m 2012-04-15 15:18:34 UTC (rev 10229) +++ trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m 2012-04-15 15:22:55 UTC (rev 10230) @@ -48,7 +48,8 @@ parser = inputParser (); parser.FunctionName = "simplifypolyline"; parser = addParamValue (parser,'Nmax', 100, @(x)x>0); - parser = addParamValue (parser,'Tol', 1e-4, @(x)x>0); + toldef = 1e-4;%max(sumsq(diff(pline_o),2))*2; + parser = addParamValue (parser,'Tol', toldef, @(x)x>0); parser = addParamValue (parser,'MaxIter', 100, @(x)x>0); parser = parse(parser,varargin{:}); @@ -56,7 +57,7 @@ tol = parser.Results.Tol; MaxIter = parser.Results.MaxIter; - clear parser + clear parser toldef msg = ["Maximum number of points reached with maximal error %g." ... " Increase '%s' if the result is not satisfactory."]; # ------ # @@ -108,8 +109,6 @@ function [dist ii] = dd (p,e,idx) [d pos] = distancePointEdge(p,e); - tf = abs(pos) <= abs(pos*eps) | abs(pos-1) <= abs((pos-1)*eps); - d(tf) = -1; [dist ii] = max(d); ii = idx(ii); endfunction @@ -137,3 +136,20 @@ %! %! % --------------------------------------------------------- %! % Four approximations of the initial polyline with decreasing tolerances. + +%!demo +%! P = [0 0; 3 1; 3 4; 1 3; 2 2; 1 1]; +%! func = @(x,y) linspace(x,y,5); +%! P2(:,1) = cell2mat( ... +%! arrayfun (func, P(1:end-1,1),P(2:end,1), ... +%! 'uniformoutput',false))'(:); +%! P2(:,2) = cell2mat( ... +%! arrayfun (func, P(1:end-1,2),P(2:end,2), ... +%! 'uniformoutput',false))'(:); +%! +%! P2s = simplifypolyline (P2); +%! +%! plot(P(:,1),P(:,2),'s',P2(:,1),P2(:,2),'o',P2s(:,1),P2s(:,2),'-ok'); +%! +%! % --------------------------------------------------------- +%! % Simplification of a polyline in the plane. Modified: trunk/octave-forge/main/geometry/inst/shape2d/curve2polyline.m =================================================================== --- trunk/octave-forge/main/geometry/inst/shape2d/curve2polyline.m 2012-04-15 15:18:34 UTC (rev 10229) +++ trunk/octave-forge/main/geometry/inst/shape2d/curve2polyline.m 2012-04-15 15:22:55 UTC (rev 10230) @@ -100,6 +100,7 @@ %% -- abs(p0-pt) + abs(pt-p1) - abs(p0-p1) almost zero. %% -- Curve's tange at 0,t,1 are almost parallel. %% -- pt is in chord p0 -> p1. +%% Do this in isParallel.m and remove this function PL = p(1:2:end-2,:); PC = p(2:2:end-1,:); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-04-15 15:18:41
|
Revision: 10229 http://octave.svn.sourceforge.net/octave/?rev=10229&view=rev Author: paramaniac Date: 2012-04-15 15:18:34 +0000 (Sun, 15 Apr 2012) Log Message: ----------- control-devel: plotting for frequency-domain iddata Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/@iddata/plot.m Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/plot.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/plot.m 2012-04-15 14:29:54 UTC (rev 10228) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/plot.m 2012-04-15 15:18:34 UTC (rev 10229) @@ -29,32 +29,64 @@ [n, p, m, e] = size (dat); expname = __labels__ (dat.expname, "exp"); - if (m == 0) # time series - for k = 1 : e - if (k > 1) - pause - endif - plot (dat.y{k}) - title (expname{k}) - % hold on - endfor - else # inputs present - for k = 1 : e - if (k > 1) - pause - endif - subplot (2, 1, 1) - plot (dat.y{k}) - title (expname{k}) - legend (__labels__ (dat.outname, "y"){:}) - % hold on - subplot (2, 1, 2) - stairs (dat.u{k}) - legend (__labels__ (dat.inname, "u"){:}) - % hold on - endfor + if (dat.timedomain) + if (m == 0) # time series + for k = 1 : e + if (k > 1) + pause + endif + plot (dat.y{k}) + title (expname{k}) + legend (__labels__ (dat.outname, "y"){:}) + % hold on + endfor + else # inputs present + for k = 1 : e + if (k > 1) + pause + endif + subplot (2, 1, 1) + plot (dat.y{k}) + title (expname{k}) + legend (__labels__ (dat.outname, "y"){:}) + % hold on + subplot (2, 1, 2) + stairs (dat.u{k}) + legend (__labels__ (dat.inname, "u"){:}) + % hold on + endfor + endif + else # frequency domain + if (m == 0) # time series + for k = 1 : e + if (k > 1) + pause + endif + bar (dat.w{k}, 20*log10 (abs (dat.y{k}))) + xlim ([dat.w{k}(1), dat.w{k}(end)]) + title (expname{k}) + legend (__labels__ (dat.outname, "y"){:}) + endfor + else # inputs present + for k = 1 : e + if (k > 1) + pause + endif + subplot (2, 1, 1) + bar (dat.w{k}, 20*log10 (abs (dat.y{k}))) + xlim ([dat.w{k}(1), dat.w{k}(end)]) + title (expname{k}) + legend (__labels__ (dat.outname, "y"){:}) + subplot (2, 1, 2) + bar (dat.w{k}, 20*log10(abs (dat.u{k}))) + xlim ([dat.w{k}(1), dat.w{k}(end)]) + legend (__labels__ (dat.inname, "u"){:}) + endfor + endif endif - - hold off -endfunction \ No newline at end of file + ## TODO: think about the 20*log10 and the bars in general + + % hold off + +endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-15 14:30:01
|
Revision: 10228 http://octave.svn.sourceforge.net/octave/?rev=10228&view=rev Author: jpicarbajal Date: 2012-04-15 14:29:54 +0000 (Sun, 15 Apr 2012) Log Message: ----------- geometry: Ramer-Douglas-Peucker algorithm to simplify polylines and polygons. Modified Paths: -------------- trunk/octave-forge/main/geometry/NEWS trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m Modified: trunk/octave-forge/main/geometry/NEWS =================================================================== --- trunk/octave-forge/main/geometry/NEWS 2012-04-15 11:23:54 UTC (rev 10227) +++ trunk/octave-forge/main/geometry/NEWS 2012-04-15 14:29:54 UTC (rev 10228) @@ -4,12 +4,13 @@ geometry-1.4.2 Release Date: 2012-XX-XX Release Manager: Juan Pablo Carbajal =============================================================================== -* Added function +* Added functions: - curveval.m: Evaluates a polynomial curve defined as a 2-by-N matrix. - curve2polyline.m: Converts a polynomial curve into a polyline by the adaptive sampling method. + - simplifypolyline.m: Ramer-Douglas-Peucker algorithm to simplify polylines. -* Changed functions +* Changed functions: - distancePointEdge.m: Now the function computes the distance between all points and all edges. A third optional argument provides backward compatibility. Modified: trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m =================================================================== --- trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m 2012-04-15 11:23:54 UTC (rev 10227) +++ trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m 2012-04-15 14:29:54 UTC (rev 10228) @@ -42,6 +42,7 @@ %% @end deftypefn function [pline idx] = simplifypolyline (pline_o, varargin) +%% TODO do not print warnings if user provided Nmax or MaxIter. # --- Parse arguments --- # parser = inputParser (); @@ -67,11 +68,13 @@ % Find the point with the maximum distance. [dist ii] = maxdistance (pline_o, idx); - if dist < tol; + tf = dist > tol; + n = sum(tf); + if all(!tf); break; end - idx(end+1) = ii; + idx(end+1:end+n) = ii(tf); idx = sort(idx); if length(idx) >= Nmax @@ -87,22 +90,29 @@ pline = pline_o(idx,:); endfunction -function [dist ii] = maxdistance (p,idx) +function [dist ii] = maxdistance (p, idx) + %% Separate the groups of points according to the edge they can divide. + func = @(x,y) x:y; + idxc = arrayfun (func, idx(1:end-1), idx(2:end), "UniformOutput",false); + points = cellfun (@(x)p(x,:), idxc, "UniformOutput",false); + + %% Build the edges edges = [p(idx(1:end-1),:) p(idx(2:end),:)]; - %% Calculate distance between all points and edges - %% What is better? this or a only comparing the points that are between the extrema - %% of each edge. - [d pos] = distancePointEdge (p, edges); + edges = mat2cell (edges, ones(1,size(edges,1)), 4)'; - %% Filter out all points outside the edges - tf = pos == 0 | pos == 1; - d(tf) = -1; + %% Calculate distance between the points and the corresponding edge + [dist ii] = cellfun(@dd, points,edges,idxc); - [dist j] = max(d(:)); - ii = ind2sub (size(d),j); +endfunction -end +function [dist ii] = dd (p,e,idx) + [d pos] = distancePointEdge(p,e); + tf = abs(pos) <= abs(pos*eps) | abs(pos-1) <= abs((pos-1)*eps); + d(tf) = -1; + [dist ii] = max(d); + ii = idx(ii); +endfunction %!demo %! t = linspace(0,1,100).'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-15 12:53:47
|
Revision: 10227 http://octave.svn.sourceforge.net/octave/?rev=10227&view=rev Author: jpicarbajal Date: 2012-04-15 11:23:54 +0000 (Sun, 15 Apr 2012) Log Message: ----------- geometry: Ramer-Douglas-Peucker algorithm to simplify polylines. Modified Paths: -------------- trunk/octave-forge/main/geometry/NEWS Added Paths: ----------- trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m Modified: trunk/octave-forge/main/geometry/NEWS =================================================================== --- trunk/octave-forge/main/geometry/NEWS 2012-04-15 11:00:12 UTC (rev 10226) +++ trunk/octave-forge/main/geometry/NEWS 2012-04-15 11:23:54 UTC (rev 10227) @@ -9,6 +9,11 @@ - curve2polyline.m: Converts a polynomial curve into a polyline by the adaptive sampling method. +* Changed functions + - distancePointEdge.m: Now the function computes the distance between all points + and all edges. A third optional argument provides + backward compatibility. + * Known issues - simplifypolygon.m returns empty polygons when points are repeated, i.e when the polygon is not correctly formed. Added: trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m =================================================================== --- trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m (rev 0) +++ trunk/octave-forge/main/geometry/inst/polygons2d/simplifypolyline.m 2012-04-15 11:23:54 UTC (rev 10227) @@ -0,0 +1,129 @@ +%% Copyright (c) 2012 Juan Pablo Carbajal <car...@if...> +%% +%% This program is free software: you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% any later version. +%% +%% 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, see <http://www.gnu.org/licenses/>. + +%% -*- texinfo -*- +%% @deftypefn {Function File} {[@var{pline2} @var{idx}] = } simplifypolyline (@var{pline}) +%% @deftypefnx {Function File} {@dots{} = } simplifypolyline (@dots{},@var{property},@var{value},@dots{}) +%% Simplify or subsample a polyline using the Ramer-Douglas-Peucker algorithm, +%% a.k.a. the iterative end-point fit algorithm or the split-and-merge algorithm. +%% +%% The @var{pline} as a N-by-2 matrix. Rows correspond to the +%% verices (compatible with @code{polygons2d}). The vector @var{idx} constains +%% the indexes on vetices in @var{pline} that generates @var{pline2}, i.e. +%% @code{pline2 = pline(idx,:)}. +%% +%% @strong{Parameters} +%% @table @samp +%% @item 'Nmax' +%% Maximum number of vertices. Default value @code{100}. +%% @item 'Tol' +%% Tolerance for the error criteria. Default value @code{1e-4}. +%% @item 'MaxIter' +%% Maximum number of iterations. Default value @code{10}. +%% @item 'Method' +%% Not implemented. +%% @end table +%% +%% Run @code{demo simplifypolyline} to see an example. +%% +%% @seealso{curve2polyline, curveval} +%% @end deftypefn + +function [pline idx] = simplifypolyline (pline_o, varargin) + + # --- Parse arguments --- # + parser = inputParser (); + parser.FunctionName = "simplifypolyline"; + parser = addParamValue (parser,'Nmax', 100, @(x)x>0); + parser = addParamValue (parser,'Tol', 1e-4, @(x)x>0); + parser = addParamValue (parser,'MaxIter', 100, @(x)x>0); + parser = parse(parser,varargin{:}); + + Nmax = parser.Results.Nmax; + tol = parser.Results.Tol; + MaxIter = parser.Results.MaxIter; + + clear parser + msg = ["Maximum number of points reached with maximal error %g." ... + " Increase '%s' if the result is not satisfactory."]; + # ------ # + + [N dim] = size(pline_o); + idx = [1 N]; + + for iter = 1:MaxIter + % Find the point with the maximum distance. + [dist ii] = maxdistance (pline_o, idx); + + if dist < tol; + break; + end + + idx(end+1) = ii; + idx = sort(idx); + + if length(idx) >= Nmax + warning('geometry:MayBeWrongOutput', sprintf(msg,dist,'Nmax')); + break; + end + + end + if iter == MaxIter + warning('geometry:MayBeWrongOutput', sprintf(msg,dist,'MaxIter')); + end + + pline = pline_o(idx,:); +endfunction + +function [dist ii] = maxdistance (p,idx) + + edges = [p(idx(1:end-1),:) p(idx(2:end),:)]; + %% Calculate distance between all points and edges + %% What is better? this or a only comparing the points that are between the extrema + %% of each edge. + [d pos] = distancePointEdge (p, edges); + + %% Filter out all points outside the edges + tf = pos == 0 | pos == 1; + d(tf) = -1; + + [dist j] = max(d(:)); + ii = ind2sub (size(d),j); + +end + +%!demo +%! t = linspace(0,1,100).'; +%! y = polyval([1 -1.5 0.5 0],t); +%! pline = [t y]; +%! +%! figure(1) +%! clf +%! plot (t,y,'-r;Original;','linewidth',2); +%! hold on +%! +%! tol = [8 2 1 0.5]*1e-2; +%! colors = jet(4); +%! +%! for i=1:4 +%! pline_ = simplifypolyline(pline,'tol',tol(i)); +%! msg = sprintf('-;%g;',tol(i)); +%! h = plot (pline_(:,1),pline_(:,2),msg); +%! set(h,'color',colors(i,:),'linewidth',2,'markersize',4); +%! end +%! hold off +%! +%! % --------------------------------------------------------- +%! % Four approximations of the initial polyline with decreasing tolerances. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-15 11:00:19
|
Revision: 10226 http://octave.svn.sourceforge.net/octave/?rev=10226&view=rev Author: jpicarbajal Date: 2012-04-15 11:00:12 +0000 (Sun, 15 Apr 2012) Log Message: ----------- miscellaneous: Adding truncate function for evaluation of the community. Modified Paths: -------------- trunk/octave-forge/main/miscellaneous/devel/truncate.m Modified: trunk/octave-forge/main/miscellaneous/devel/truncate.m =================================================================== --- trunk/octave-forge/main/miscellaneous/devel/truncate.m 2012-04-15 11:00:07 UTC (rev 10225) +++ trunk/octave-forge/main/miscellaneous/devel/truncate.m 2012-04-15 11:00:12 UTC (rev 10226) @@ -14,15 +14,19 @@ %% along with this program. If not, see <http://www.gnu.org/licenses/>. %% -*- texinfo -*- -%% @deftypefn {Function File} {@var{y} = } truncate (@var{x}, @var{order}) +%% @deftypefn {Function File} {@var{y} = } truncate (@var{x}, @var{order},@var{method}) +%% @deftypefnx {Function File} {@var{y} = } truncate (@dots,@var{method}) %% Truncates @var{X} to @var{order} of magnitude. %% -%% Example +%% The optional argument @var{method} can be a hanlde to a function used to +%% truncate the number. Default is @code{@round}. +%% +%% Examples: %% @example %% format long %% x = 987654321.123456789; %% order = [3:-1:0 -(1:3)]'; -%% y = truncate(x,order) +%% y = truncate (x,order) %% y = %% 987654000.000000 %% 987654300.000000 @@ -31,13 +35,20 @@ %% 987654321.100000 %% 987654321.120000 %% 987654321.123000 +%% +%% format +%% [truncate(0.127,-2), truncate(0.127,-2,@floor)] +%% ans = +%% 0.13000 0.12000 +%% %% @end example + %% %% @seealso{round,fix,ceil,floor} %% @end deftypefn -function y = truncate (x,order) +function y = truncate (x,order,method=@round) ino = 0.1.^order; o = 10.^order; - y = round (x.*ino).*o; + y = method (x.*ino).*o; end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2012-04-15 11:00:13
|
Revision: 10225 http://octave.svn.sourceforge.net/octave/?rev=10225&view=rev Author: treichl Date: 2012-04-15 11:00:07 +0000 (Sun, 15 Apr 2012) Log Message: ----------- Fixed test procedure. Modified Paths: -------------- trunk/octave-forge/main/odepkg/inst/odepkg.m Modified: trunk/octave-forge/main/odepkg/inst/odepkg.m =================================================================== --- trunk/octave-forge/main/odepkg/inst/odepkg.m 2012-04-15 10:51:47 UTC (rev 10224) +++ trunk/octave-forge/main/odepkg/inst/odepkg.m 2012-04-15 11:00:07 UTC (rev 10225) @@ -72,7 +72,7 @@ for vcnt=1:length(vfile) printf ('Testing function %s ... ', vsolv{vcnt}); - autoload (vsolv{vcnt}, canonicalize_file_name ('dldsolver.oct')); + autoload (vsolv{vcnt}, which ('dldsolver.oct')); test (vfile{vcnt}, 'quiet'); fflush (1); end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-15 10:51:53
|
Revision: 10224 http://octave.svn.sourceforge.net/octave/?rev=10224&view=rev Author: jpicarbajal Date: 2012-04-15 10:51:47 +0000 (Sun, 15 Apr 2012) Log Message: ----------- miscellaneous: Adding truncate function for evaluation of the community. Added Paths: ----------- trunk/octave-forge/main/miscellaneous/devel/truncate.m Removed Paths: ------------- trunk/octave-forge/main/miscellaneous/inst/truncate.m Copied: trunk/octave-forge/main/miscellaneous/devel/truncate.m (from rev 10223, trunk/octave-forge/main/miscellaneous/inst/truncate.m) =================================================================== --- trunk/octave-forge/main/miscellaneous/devel/truncate.m (rev 0) +++ trunk/octave-forge/main/miscellaneous/devel/truncate.m 2012-04-15 10:51:47 UTC (rev 10224) @@ -0,0 +1,43 @@ +%% Copyright (c) 2012 Juan Pablo Carbajal <car...@if...> +%% +%% This program is free software: you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% any later version. +%% +%% 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, see <http://www.gnu.org/licenses/>. + +%% -*- texinfo -*- +%% @deftypefn {Function File} {@var{y} = } truncate (@var{x}, @var{order}) +%% Truncates @var{X} to @var{order} of magnitude. +%% +%% Example +%% @example +%% format long +%% x = 987654321.123456789; +%% order = [3:-1:0 -(1:3)]'; +%% y = truncate(x,order) +%% y = +%% 987654000.000000 +%% 987654300.000000 +%% 987654320.000000 +%% 987654321.000000 +%% 987654321.100000 +%% 987654321.120000 +%% 987654321.123000 +%% @end example +%% +%% @seealso{round,fix,ceil,floor} +%% @end deftypefn + +function y = truncate (x,order) + ino = 0.1.^order; + o = 10.^order; + y = round (x.*ino).*o; +end Deleted: trunk/octave-forge/main/miscellaneous/inst/truncate.m =================================================================== --- trunk/octave-forge/main/miscellaneous/inst/truncate.m 2012-04-15 10:50:05 UTC (rev 10223) +++ trunk/octave-forge/main/miscellaneous/inst/truncate.m 2012-04-15 10:51:47 UTC (rev 10224) @@ -1,43 +0,0 @@ -%% Copyright (c) 2012 Juan Pablo Carbajal <car...@if...> -%% -%% This program is free software: you can redistribute it and/or modify -%% it under the terms of the GNU General Public License as published by -%% the Free Software Foundation, either version 3 of the License, or -%% any later version. -%% -%% 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, see <http://www.gnu.org/licenses/>. - -%% -*- texinfo -*- -%% @deftypefn {Function File} {@var{y} = } truncate (@var{x}, @var{order}) -%% Truncates @var{X} to @var{order} of magnitude. -%% -%% Example -%% @example -%% format long -%% x = 987654321.123456789; -%% order = [3:-1:0 -(1:3)]'; -%% y = truncate(x,order) -%% y = -%% 987654000.000000 -%% 987654300.000000 -%% 987654320.000000 -%% 987654321.000000 -%% 987654321.100000 -%% 987654321.120000 -%% 987654321.123000 -%% @end example -%% -%% @seealso{round,fix,ceil,floor} -%% @end deftypefn - -function y = truncate (x,order) - ino = 0.1.^order; - o = 10.^order; - y = round (x.*ino).*o; -end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |