https://wiki.octave.org/wiki/api.php?action=feedcontributions&user=Ricardofantin&feedformat=atom
Octave - User contributions [en]
2024-03-29T00:05:49Z
User contributions
MediaWiki 1.39.2
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=13241
Image package
2020-07-11T21:43:59Z
<p>Ricardofantin: remove (unreleased) in the colorangle 2.10.0 function</p>
<hr />
<div>The {{Forge|image|image package}} is part of the Octave Forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
<div class="tocinline">__TOC__</div><br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwtraceboundary<br />
* bwulterode<br />
* chromadapt<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* [https://savannah.gnu.org/patch/?9717 imapplymatrix]<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* [https://savannah.gnu.org/patch/?9730 imfuse]<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imreducehaze<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || In Progress<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52959}} || [octave forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|55059}} || [octave forge] (image) Failing unit test for grayslice || In Progress<br />
|-<br />
| {{bug|55202}} || [octave forge] (image) imresize fails for method nearest and image of 1 row || Confirmed<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: [octave forge] (image) multithresh<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9717}}: [octave forge] (image) new function imapplymatrix<br />
* {{patch|9729}}: [octave forge] (image) -- rgb2xyz conversion with adapted whitepoint<br />
* {{patch|9730}}: [octave forge] (image) new function imfuse<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || 2.10.0 || || || <br />
|-<br />
| rgb2gray || function is in Octave core || {{bug|53654}} || || Octave version 4.4.0 and above<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| colorangle || 2.10.0 || || || <br />
|-<br />
| lab2double || 2.6.0 || || || <br />
|-<br />
| lab2rgb || 2.6.0 || || || <br />
|-<br />
| lab2uint16 || 2.6.0 || || || <br />
|-<br />
| lab2uint8 || 2.6.0 || || || <br />
|-<br />
| lab2xyz || 2.6.0 || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || 2.8.0 || || || <br />
|-<br />
| rgb2lab || 2.6.0 || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || 2.8.0 || || || <br />
|-<br />
| rgb2xyz || 2.6.0 || || || <br />
|-<br />
| rgb2ycbcr || < 1.0.0|| || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || 2.6.0 || || || <br />
|-<br />
| xyz2rgb || 2.6.0 || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || 2.2.0|| || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || 2.2.0 || || ||<br />
|-<br />
| imnoise || 2.2.2 || || ||<br />
|-<br />
| phantom || 2.6.2 || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage || 2.12.0 || || ||<br />
|- <br />
| integralImage3 || 2.12.0 || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || || ||<br />
|- <br />
| wiener2 || 2.8.0|| || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || {{patch|9717}} || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || 2.8.0 || || ||<br />
|- <br />
| imextendedmin || 2.8.0 || || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || 2.8.0 || || ||<br />
|- <br />
| imhmin || 2.8.0 || || ||<br />
|- <br />
| imimposemin || 2.8.0 || || ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Image Transforms ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| dct2 || || || ||<br />
|-<br />
| dctmtx || || || ||<br />
|-<br />
| fanbeam || || || ||<br />
|-<br />
| fan2para || || || ||<br />
|-<br />
| fftshift|| || || ||<br />
|-<br />
| fft2 || || || ||<br />
|-<br />
| hough || || || ||<br />
|-<br />
| houghlines || || || ||<br />
|-<br />
| houghpeaks || || || ||<br />
|-<br />
|idct2 || || || ||<br />
|-<br />
|ifftshift|| || || ||<br />
|-<br />
|ifft2|| || || ||<br />
|-<br />
|iradon|| || || ||<br />
|- <br />
|para2fan|| || || ||<br />
|-<br />
|radon|| || || ||<br />
|-<br />
|}<br />
<br />
=== Graphical Interface Interaction === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| imellipse || - || || ||<br />
|- <br />
| imfreehand || - || || ||<br />
|-<br />
| imline || - || || ||<br />
|-<br />
| immagbox || - || || ||<br />
|-<br />
| imoverview || - || || ||<br />
|-<br />
| imoverviewpanel || - || || ||<br />
|-<br />
| impixelinfo || - || {{patch|8722}} || ||<br />
|-<br />
| impixelinfoval || - || {{patch|8722}} || ||<br />
|-<br />
| impixelregion || - || || ||<br />
|-<br />
| impixelregionpanel || - || || ||<br />
|-<br />
| implay || - || || ||<br />
|-<br />
| impoint || - || || ||<br />
|-<br />
| impoly || - || || ||<br />
|-<br />
| imrect || - || || ||<br />
|-<br />
| imscrollpanel || - || || ||<br />
|-<br />
| iptgetpref || - || || ||<br />
|-<br />
| iptprefs || - || || ||<br />
|-<br />
| iptsetpref || - || || ||<br />
|-<br />
|}<br />
* Obs: implay, iptgetpref, iptprefs, iptsetpref functions are on Basic Display section too...<br />
<br />
[[Category:Octave Forge]]<br />
[[Category:Missing functions]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Mapping_package&diff=13240
Mapping package
2020-07-11T21:25:02Z
<p>Ricardofantin: Removed functions added in 1.4.1</p>
<hr />
<div>The {{Forge|mapping|mapping package}} is part of the Octave Forge project.<br />
<br />
== Development ==<br />
=== Roadmap ===<br />
<br />
Targets for next mapping package releases:<br />
* Add rasterwrite.m (complementary to rasterread). Please contact package maintainer, there's already a C++ skeleton.<br />
* Maybe add wrapper functions around rasterread and rasterwrite (for e.g., geotiff, ASCII grid, etc.).<br />
* Add more options to mapshow.<br />
* Implement support for projections. I (current mapping pkg maintainer) have little need nor much experience with this subject => help welcome! BTW there's an OF proj package that offers some of the functionality.<br />
* Add geodesy functions. Patches have been submitted and integrated. The current roadmap is to further integrate Felipe Nievinsky's geodesy toolbox, updated by M. Hirsch.<br />
<br />
Several functions in the current mapping package release (1.4.0) and upcoming (1.4.1) haven't had much testing. Please try them out and report issues in the bug tracker with "[octave forge](mapping)" tag in the title.<br />
<br />
=== Missing functions ===<br />
Follows an incomplete list of stuff missing in the mapping package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
As a number of polygon functions in the mapping package relate to geometry stuff, chances are that some of that lacking functionality is already present in the [http://wiki.octave.org/Geometry_package geometry package]. In fact there is a discussion about which functions belong where. Matlab compatibility suggests the mapping package, but based on similar functionality the geometry package might also be a good home.<br />
<br />
Recent mapping toolbox versions are classdef-based. It is unclear yet if we need to follow this route as classdef support in Octave is still experimental and has no file I/O.<br />
<br />
{{Note|this entire section is about upcoming version (expected May 2020) 1.4.1. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [http://hg.code.sf.net/p/octave/mapping/file sources], see esp. the INDEX file, before adding it.}}<br />
<br />
==== Alphabetical list ====<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* arcgridread '''[1]'''<br />
* areaint<br />
* areamat<br />
* areaquad<br />
* avhrrgoode<br />
* avhrrlambert<br />
* axesm<br />
* axesmui<br />
* bufferm<br />
* bufgeoquad<br />
* camposm<br />
* camtargm<br />
* camupm<br />
* clabelm<br />
* clegendm<br />
* clipdata<br />
* clma<br />
* clrmenu<br />
* contour3m<br />
* contourcbar<br />
* contourcmap<br />
* contourfm<br />
* contourm<br />
* defaultm<br />
* demcmap<br />
* demdataui<br />
* distortcalc<br />
* dted<br />
* dteds<br />
* ecef2lv<br />
* ellipse1<br />
* etopo<br />
* etopo5<br />
* flatearthpoly<br />
* framem<br />
* gc2sc<br />
* gcm<br />
* gcpmap<br />
* gcxgc<br />
* gcxsc<br />
* geoloc2grid<br />
* geopoint<br />
* geoquadline<br />
* geoquadpt<br />
* georasterref<br />
* geoshape<br />
* geoshow<br />
* geotiff2mstruct<br />
* geotiffinfo '''[2]'''<br />
* geotiffread '''[1]'''<br />
* geotiffwrite<br />
* getm<br />
* getworldfilename<br />
* globedem<br />
* globedems<br />
* gradientm<br />
* grid2image<br />
* gridm<br />
* gshhs<br />
* gtextm<br />
* gtopo30<br />
* gtopo30s<br />
* handlem<br />
* imbedm<br />
* ingeoquad<br />
* inputm<br />
* interpm<br />
* intersectgeoquad<br />
* intrplat<br />
* intrplon<br />
* ismap<br />
* ispolycw '''4'''<br />
* ispolyccw '''[4]'''<br />
* kmlwrite<br />
* kmlwriteline<br />
* kmlwritepoint<br />
* lightm<br />
* lightmui<br />
* linecirc<br />
* linem<br />
* los2<br />
* ltln2val<br />
* lv2ecef<br />
* makeattribspec<br />
* makedbfspec<br />
* makerefmat<br />
* map.geodesy.AuthalicLatitudeConverter<br />
* map.geodesy.ConformalLatitudeConverter<br />
* map.geodesy.IsometricLatitudeConverter<br />
* map.geodesy.RectifyingLatitudeConverter<br />
* map.geodesy.isdegree<br />
* map.rasterref.GeographicRasterReference<br />
* map.rasterref.MapRasterReference<br />
* maplist<br />
* mapoutline<br />
* mappoint<br />
* mapprofile<br />
* maprasterref<br />
* maps<br />
* mapshape<br />
* mapshow '''[3]'''<br />
* maptool<br />
* maptrim<br />
* maptriml<br />
* maptrimp<br />
* maptrims<br />
* mapview<br />
* mdistort<br />
* meridianfwd<br />
* meshlsrm<br />
* meshm<br />
* mfwdtran<br />
* minvtran<br />
* mlabel<br />
* mlabelzero22pi<br />
* newpole<br />
* northarrow<br />
* oblateSpheroid<br />
* org2pol<br />
* originui<br />
* outlinegeoquad<br />
* panzoom<br />
* parallelui<br />
* pcolorm<br />
* plabel<br />
* plot3m<br />
* plotm<br />
* polcmap<br />
* poly2ccw '''[4]'''<br />
* poly2cw '''[4]'''<br />
* poly2fv<br />
* polybool '''[4]'''<br />
* polyjoin '''[4]'''<br />
* polymerge<br />
* polysplit '''[4]'''<br />
* polyxpoly<br />
* projfwd<br />
* projinv<br />
* projlist<br />
* putpole<br />
* quiver3m<br />
* quiverm<br />
* reducem<br />
* referenceSphere<br />
* refmatToGeoRasterReference<br />
* refmatToMapRasterReference<br />
* refmatToWorldFileMatrix<br />
* refvecToGeoRasterReference<br />
* resizem<br />
* rhxrh<br />
* rotatem<br />
* rotatetext<br />
* rsphere<br />
* satbath<br />
* scaleruler<br />
* scatterm<br />
* scircle1<br />
* scircle2<br />
* scircleg<br />
* scirclui<br />
* scxsc<br />
* sdtsdemread '''[1]'''<br />
* sdtsinfo '''[2]'''<br />
* sectorg<br />
* setm<br />
* shaderel<br />
* showaxes<br />
* stem3m<br />
* surfacem<br />
* surflm<br />
* surflsrm<br />
* surfm<br />
* symbolm<br />
* tbase<br />
* tightmap<br />
* tissot<br />
* track1<br />
* track2<br />
* trackg<br />
* trackui<br />
* unwrapMultipart<br />
* usamap<br />
* usgs24kdem<br />
* usgsdem<br />
* usgsdems<br />
* utmgeoid<br />
* utmzoneui<br />
* vec2mtx<br />
* vfwdtran<br />
* viewshed<br />
* vinvtran<br />
* vmap0data<br />
* vmap0read<br />
* vmap0rhead<br />
* vmap0ui<br />
* webmap<br />
* WebMapServer<br />
* wmcenter<br />
* wmclose<br />
* wmlimits<br />
* wmline<br />
* wmmarker<br />
* wmprint<br />
* wmremove<br />
* WMSCapabilities<br />
* wmsfind<br />
* wmsinfo<br />
* WMSLayer<br />
* WMSMapRequest<br />
* wmsread<br />
* wmsupdate<br />
* wmzoom<br />
* worldFileMatrixToRefmat<br />
* worldfileread<br />
* worldfilewrite<br />
* worldmap<br />
* zdatam<br />
</div><br />
<br />
* [1] ''As of mapping-1.2.1, rasterread can read any raster file that the GDAL library supports; see http://www.gdal.org/frmt_various.html. No separate functions for individual file format are required. There's some work to do on unifying output formats.''<br />
* [2] ''As [1], rasterinfo does the job.''<br />
* [3] ''As of mapping-1.2.0, there's a basic mapshow.''<br />
* [4] ''Implemented in OF geometry-4.0.0''<br />
* [5] ''See OF image package''<br />
* * ''Implemented in dev version''<br />
<br />
==== Grouped list ====<br />
(needs update relative to table above and newer mapping toolbox releases)<br />
(see numbered notes above)<br />
{| class="wikitable"<br />
| arcgridread '''[1]'''||File Import and Export||Standard File Formats<br />
|-<br />
| geotiff2mstruct||File Import and Export||Standard File Formats<br />
|-<br />
| geotiffinfo '''[2]'''||File Import and Export||Standard File Formats<br />
|-<br />
| geotiffread '''[1]'''||File Import and Export||Standard File Formats<br />
|-<br />
| geotiffwrite||File Import and Export||Standard File Formats<br />
|-<br />
| sdtsdemread '''[1]'''||File Import and Export||Standard File Formats<br />
|-<br />
| sdtsinfo '''[2]'''||File Import and Export||Standard File Formats<br />
|-<br />
| worldfileread||File Import and Export||Standard File Formats<br />
|-<br />
| worldfilewrite||File Import and Export||Standard File Formats<br />
|-<br />
| getworldfilename||File Import and Export||Standard File Formats<br />
|-<br />
| gpxread||File Import and Export||Standard File Formats<br />
|-<br />
| kmlwrite||File Import and Export||Standard File Formats<br />
|-<br />
| kmlwriteline||File Import and Export||Standard File Formats<br />
|-<br />
| kmlwritepoint||File Import and Export||Standard File Formats<br />
|-<br />
| makeattribspec||File Import and Export||Standard File Formats<br />
|-<br />
| makedbfspec||File Import and Export||Standard File Formats<br />
|-<br />
| imread '''[5]'''||File Import and Export||Standard File Formats<br />
|-<br />
| imwrite '''[5]'''||File Import and Export||Standard File Formats<br />
|-<br />
| demdataui||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| dted||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| dteds||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| etopo||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| etopo5||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| globedem||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| globedems||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| gtopo30||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| gtopo30s||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| satbath||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| tbase||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| usgs24kdem||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| usgsdem '''[1]'''||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| usgsdems '''[1]'''||File Import and Export||Gridded Terrain and Bathymetry Products<br />
|-<br />
| avhrrgoode||File Import and Export||Specific Vector and Gridded Data Products<br />
|-<br />
| avhrrlambert||File Import and Export||Specific Vector and Gridded Data Products<br />
|-<br />
| egm96geoid||File Import and Export||Specific Vector and Gridded Data Products<br />
|-<br />
| gshhs||File Import and Export||Specific Vector and Gridded Data Products<br />
|-<br />
| vmap0data||File Import and Export||Specific Vector and Gridded Data Products<br />
|-<br />
| vmap0read||File Import and Export||Specific Vector and Gridded Data Products<br />
|-<br />
| vmap0rhead||File Import and Export||Specific Vector and Gridded Data Products<br />
|-<br />
| vmap0ui||File Import and Export||Specific Vector and Gridded Data Products<br />
|-<br />
| WebMapServer||Web Maps||Web Map Service<br />
|-<br />
| WMSCapabilities||Web Maps||Web Map Service<br />
|-<br />
| WMSLayer||Web Maps||Web Map Service<br />
|-<br />
| WMSMapRequest||Web Maps||Web Map Service<br />
|-<br />
| wmsfind||Web Maps||Web Map Service<br />
|-<br />
| wmsinfo||Web Maps||Web Map Service<br />
|-<br />
| wmsread||Web Maps||Web Map Service<br />
|-<br />
| wmsupdate||Web Maps||Web Map Service<br />
|-<br />
| webmap||Web Maps||Web Map Display<br />
|-<br />
| wmclose||Web Maps||Web Map Display<br />
|-<br />
| wmprint||Web Maps||Web Map Display<br />
|-<br />
| wmmarker||Web Maps||Web Map Display<br />
|-<br />
| wmline||Web Maps||Web Map Display<br />
|-<br />
| wmremove||Web Maps||Web Map Display<br />
|-<br />
| wmcenter||Web Maps||Web Map Display<br />
|-<br />
| wmzoom||Web Maps||Web Map Display<br />
|-<br />
| wmlimits||Web Maps||Web Map Display<br />
|-<br />
| axesm||Map Display||Map Layout and Axes<br />
|-<br />
| axesmui||Map Display||Map Layout and Axes<br />
|-<br />
| clma||Map Display||Map Layout and Axes<br />
|-<br />
| gcm||Map Display||Map Layout and Axes<br />
|-<br />
| getm||Map Display||Map Layout and Axes<br />
|-<br />
| handlem||Map Display||Map Layout and Axes<br />
|-<br />
| handlem-ui||Map Display||Map Layout and Axes<br />
|-<br />
| ismap||Map Display||Map Layout and Axes<br />
|-<br />
| setm||Map Display||Map Layout and Axes<br />
|-<br />
| showaxes||Map Display||Map Layout and Axes<br />
|-<br />
| tightmap||Map Display||Map Layout and Axes<br />
|-<br />
| usamap||Map Display||Map Layout and Axes<br />
|-<br />
| worldmap||Map Display||Map Layout and Axes<br />
|-<br />
| namem||Map Display||Map Layout and Axes<br />
|-<br />
| tagm||Map Display||Map Layout and Axes<br />
|-<br />
| framem||Map Display||Map Layout and Axes<br />
|-<br />
| ingeoquad||Map Display||Map Layout and Axes<br />
|-<br />
| gridm||Map Display||Map Layout and Axes<br />
|-<br />
| angl2str||Map Display||Map Layout and Axes<br />
|-<br />
| mlabel||Map Display||Map Layout and Axes<br />
|-<br />
| mlabelzero22pi||Map Display||Map Layout and Axes<br />
|-<br />
| northarrow||Map Display||Map Layout and Axes<br />
|-<br />
| plabel||Map Display||Map Layout and Axes<br />
|-<br />
| rotatetext||Map Display||Map Layout and Axes<br />
|-<br />
| scaleruler||Map Display||Map Layout and Axes<br />
|-<br />
| geoshow||Map Display||Vector and Raster Map Display<br />
|-<br />
| grid2image||Map Display||Vector and Raster Map Display<br />
|-<br />
| linem||Map Display||Vector and Raster Map Display<br />
|-<br />
| mapshow '''[3]'''||Map Display||Vector and Raster Map Display<br />
|-<br />
| meshm||Map Display||Vector and Raster Map Display<br />
|-<br />
| pcolorm||Map Display||Vector and Raster Map Display<br />
|-<br />
| plotm||Map Display||Vector and Raster Map Display<br />
|-<br />
| plot3m||Map Display||Vector and Raster Map Display<br />
|-<br />
| surfm||Map Display||Vector and Raster Map Display<br />
|-<br />
| usamap||Map Display||Vector and Raster Map Display<br />
|-<br />
| worldmap||Map Display||Vector and Raster Map Display<br />
|-<br />
| camposm||Map Display||3-D Map Display<br />
|-<br />
| camtargm||Map Display||3-D Map Display<br />
|-<br />
| camupm||Map Display||3-D Map Display<br />
|-<br />
| daspectm||Map Display||3-D Map Display<br />
|-<br />
| demcmap||Map Display||3-D Map Display<br />
|-<br />
| lightm||Map Display||3-D Map Display<br />
|-<br />
| lightmui||Map Display||3-D Map Display<br />
|-<br />
| meshlsrm||Map Display||3-D Map Display<br />
|-<br />
| shaderel||Map Display||3-D Map Display<br />
|-<br />
| surflm||Map Display||3-D Map Display<br />
|-<br />
| surflsrm||Map Display||3-D Map Display<br />
|-<br />
| surfacem||Map Display||3-D Map Display<br />
|-<br />
| zdatam||Map Display||3-D Map Display<br />
|-<br />
| clabelm||Map Display||Contour Maps<br />
|-<br />
| clegendm||Map Display||Contour Maps<br />
|-<br />
| contourcbar||Map Display||Contour Maps<br />
|-<br />
| contourcmap||Map Display||Contour Maps<br />
|-<br />
| contourm||Map Display||Contour Maps<br />
|-<br />
| contour3m||Map Display||Contour Maps<br />
|-<br />
| contourfm||Map Display||Contour Maps<br />
|-<br />
| quiverm||Map Display||Thematic Maps<br />
|-<br />
| quiver3m||Map Display||Thematic Maps<br />
|-<br />
| scatterm||Map Display||Thematic Maps<br />
|-<br />
| stem3m||Map Display||Thematic Maps<br />
|-<br />
| symbolm||Map Display||Thematic Maps<br />
|-<br />
| clrmenu||Map Display||Interaction with Maps<br />
|-<br />
| gcpmap||Map Display||Interaction with Maps<br />
|-<br />
| gtextm||Map Display||Interaction with Maps<br />
|-<br />
| inputm||Map Display||Interaction with Maps<br />
|-<br />
| maptool||Map Display||Interaction with Maps<br />
|-<br />
| maptrim||Map Display||Interaction with Maps<br />
|-<br />
| mapview||Map Display||Interaction with Maps<br />
|-<br />
| originui||Map Display||Interaction with Maps<br />
|-<br />
| parallelui||Map Display||Interaction with Maps<br />
|-<br />
| bufferm||Data Analysis||Vector Data<br />
|-<br />
| closePolygonParts||Data Analysis||Vector Data<br />
|-<br />
| extractfield||Data Analysis||Vector Data<br />
|-<br />
| flatearthpoly||Data Analysis||Vector Data<br />
|-<br />
| interpm||Data Analysis||Vector Data<br />
|-<br />
| intrplat||Data Analysis||Vector Data<br />
|-<br />
| intrplon||Data Analysis||Vector Data<br />
|-<br />
| linecirc||Data Analysis||Vector Data<br />
|-<br />
| polcmap||Data Analysis||Vector Data<br />
|-<br />
| polyjoin||Data Analysis||Vector Data<br />
|-<br />
| polymerge||Data Analysis||Vector Data<br />
|-<br />
| polysplit||Data Analysis||Vector Data<br />
|-<br />
| reducem||Data Analysis||Vector Data<br />
|-<br />
| removeExtraNanSeparators||Data Analysis||Vector Data<br />
|-<br />
| ispolycw||Data Analysis||Vector Data<br />
|-<br />
| poly2ccw||Data Analysis||Vector Data<br />
|-<br />
| poly2cw||Data Analysis||Vector Data<br />
|-<br />
| poly2fv||Data Analysis||Vector Data<br />
|-<br />
| polybool '''[4]'''||Data Analysis||Vector Data<br />
|-<br />
| polyxpoly||Data Analysis||Vector Data<br />
|-<br />
| geopoint||Data Analysis||Vector Data<br />
|-<br />
| geoshape||Data Analysis||Vector Data<br />
|-<br />
| mappoint||Data Analysis||Vector Data<br />
|-<br />
| mapshape||Data Analysis||Vector Data<br />
|-<br />
| map.rasterref.GeographicRasterReference||Data Analysis||Raster Data and Representations<br />
|-<br />
| map.rasterref.MapRasterReference||Data Analysis||Raster Data and Representations<br />
|-<br />
| geoloc2grid||Data Analysis||Raster Data and Representations<br />
|-<br />
| imbedm||Data Analysis||Raster Data and Representations<br />
|-<br />
| ltln2val||Data Analysis||Raster Data and Representations<br />
|-<br />
| mapoutline||Data Analysis||Raster Data and Representations<br />
|-<br />
| resizem||Data Analysis||Raster Data and Representations<br />
|-<br />
| limitm||Data Analysis||Raster Data and Representations<br />
|-<br />
| georasterref||Data Analysis||Raster Data and Representations<br />
|-<br />
| makerefmat||Data Analysis||Raster Data and Representations<br />
|-<br />
| maprasterref||Data Analysis||Raster Data and Representations<br />
|-<br />
| refmatToGeoRasterReference||Data Analysis||Raster Data and Representations<br />
|-<br />
| refmatToMapRasterReference||Data Analysis||Raster Data and Representations<br />
|-<br />
| refmatToWorldFileMatrix||Data Analysis||Raster Data and Representations<br />
|-<br />
| refvecToGeoRasterReference||Data Analysis||Raster Data and Representations<br />
|-<br />
| worldFileMatrixToRefmat||Data Analysis||Raster Data and Representations<br />
|-<br />
| mapprofile||Data Analysis||Conversion Between Vector and Raster Data<br />
|-<br />
| vec2mtx||Data Analysis||Conversion Between Vector and Raster Data<br />
|-<br />
| gradientm||Data Analysis||Terrain Data Analysis<br />
|-<br />
| los2||Data Analysis||Terrain Data Analysis<br />
|-<br />
| viewshed||Data Analysis||Terrain Data Analysis<br />
|-<br />
| wgs84Ellipsoid||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| earthRadius||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| rcurve||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| rsphere||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| geocentricLatitude||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| parametricLatitude||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| geodeticLatitudeFromGeocentric||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| geodeticLatitudeFromParametric||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| axes2ecc||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| majaxis||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| minaxis||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| ecc2flat||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| flat2ecc||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| ecc2n||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| n2ecc||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| oblateSpheroid||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| referenceEllipsoid||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| referenceSphere||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| map.geodesy.AuthalicLatitudeConverter||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| map.geodesy.ConformalLatitudeConverter||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| map.geodesy.IsometricLatitudeConverter||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| map.geodesy.RectifyingLatitudeConverter||Coordinates, Geodesy, and Projections||Modeling the Earth<br />
|-<br />
| str2angle||Coordinates, Geodesy, and Projections||Lengths and Angles<br />
|-<br />
| unwrapMultipart||Coordinates, Geodesy, and Projections||Lengths and Angles<br />
|-<br />
| map.geodesy.isdegree||Coordinates, Geodesy, and Projections||Lengths and Angles<br />
|-<br />
| azimuth||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| departure||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| distance||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| gc2sc||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| gcxgc||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| gcxsc||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| meridianarc||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| meridianfwd||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| reckon||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| rhxrh||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| track1||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| track2||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| trackg||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| trackui||Coordinates, Geodesy, and Projections||Great Circles, Geodesics, and Rhumb Lines<br />
|-<br />
| ellipse1||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| deg2km||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| deg2nm||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| deg2sm||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| gcxsc||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| rad2nm||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| rad2sm||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| scircle1||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| scircle2||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| scircleg||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| scirclui||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| scxsc||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| sectorg||Coordinates, Geodesy, and Projections||Small Circles, Ellipses, and Spherical Distance<br />
|-<br />
| areaint||Coordinates, Geodesy, and Projections||Zones, Lunes, Quadrangles, and Other Areas<br />
|-<br />
| areamat||Coordinates, Geodesy, and Projections||Zones, Lunes, Quadrangles, and Other Areas<br />
|-<br />
| areaquad||Coordinates, Geodesy, and Projections||Zones, Lunes, Quadrangles, and Other Areas<br />
|-<br />
| bufgeoquad||Coordinates, Geodesy, and Projections||Zones, Lunes, Quadrangles, and Other Areas<br />
|-<br />
| geoquadline||Coordinates, Geodesy, and Projections||Zones, Lunes, Quadrangles, and Other Areas<br />
|-<br />
| geoquadpt||Coordinates, Geodesy, and Projections||Zones, Lunes, Quadrangles, and Other Areas<br />
|-<br />
| ingeoquad||Coordinates, Geodesy, and Projections||Zones, Lunes, Quadrangles, and Other Areas<br />
|-<br />
| intersectgeoquad||Coordinates, Geodesy, and Projections||Zones, Lunes, Quadrangles, and Other Areas<br />
|-<br />
| outlinegeoquad||Coordinates, Geodesy, and Projections||Zones, Lunes, Quadrangles, and Other Areas<br />
|-<br />
| map.rasterref.GeographicRasterReference||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| map.rasterref.MapRasterReference||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| antipode||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| mfwdtran||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| minvtran||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| newpole||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| org2pol||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| projfwd||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| projinv||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| putpole||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| rotatem||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| defaultm||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| geotiff2mstruct||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| maplist||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| maps||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| mfwdtran||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| minvtran||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| projlist||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| vfwdtran||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| vinvtran||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| clipdata||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| distortcalc||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| maptriml||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| maptrimp||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| maptrims||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| mdistort||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| tissot||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| utmgeoid||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| utmzone||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| utmzoneui||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| ecef2geodetic||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| geodetic2ecef||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| geodetic2enu||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| geodetic2ned||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| geodetic2aer||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| enu2geodetic||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| ned2geodetic||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| aer2geodetic||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| ecef2enu||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| ecef2ned||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| ecef2aer||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| enu2ecef||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| ned2ecef||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| aer2ecef||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| aer2enu||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| aer2ned||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| enu2aer||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| ned2aer||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| ecef2enuv||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| ecef2nedv||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| enu2ecefv||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
| ned2ecefv||Coordinates, Geodesy, and Projections||Coordinate Systems<br />
|-<br />
|}<br />
<br />
=== Missing options ===<br />
TBD<br />
<br />
=== Contributing ===<br />
* See for example [[User:Sandeepmv#Y:_Your_task]]<br />
* geod toolbox [https://drive.google.com/file/d/0B-I95wETyqQidnZWbm5TbzZRcHc/edit?usp=sharing] (BSD-licensed, available from its author outside of File Exchange)<br />
<br />
[[Category:Octave Forge]]<br />
[[Category:Missing functions]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Octave_for_Debian_systems&diff=13239
Octave for Debian systems
2020-07-09T18:36:49Z
<p>Ricardofantin: In Debian 10 openjdk-13-jdk is not available, it was changed to openjdk-11-jdk</p>
<hr />
<div>* ''This article addresses the [[:Category:Installation|installation]] and [[Building]] of GNU Octave on Debian, and Debian-based distributions such as Ubuntu.''<br />
<br />
== Installing Octave ==<br />
<br />
Binary packages for GNU Octave and many [[Octave Forge]] packages are provided by all versions of Debian and Ubuntu. These are the most well-tested binaries available and should work best for most users. To install them, run:<br />
<br />
sudo apt-get install octave<br />
<br />
In Debian and Ubuntu the "complete" GNU Octave software is split over multiple packages. To obtain the complete features of Octave, install additionally<br />
<br />
* {{codeline|octave-doc}}, {{codeline|octave-info}}, and {{codeline|octave-htmldoc}} for the documentation;<br />
* {{codeline|liboctave-dev}} for the octave development header files and mkoctfile (required to install Octave Forge packages); and<br />
* {{codeline|octave-dbg}} for the debugging symbols.<br />
<br />
Many Octave packages are also distributed by Debian and Ubuntu. These are tested to work the best with the respective Octave version. Install them via:<br />
<br />
sudo apt-get install octave-control octave-image octave-io octave-optim octave-signal octave-statistics<br />
<br />
Up to 2018, the [https://launchpad.net/~octave GNU Octave Team] on Launchpad actively maintained a PPA providing more up to date packages of Octave. These are backported from Debian unstable and are still useful for older Ubuntu installations. To set up your system to install these packages, run:<br />
<br />
sudo apt-add-repository ppa:octave/stable<br />
sudo apt-get update<br />
sudo apt-get install octave<br />
<br />
== Building Octave from source ==<br />
<br />
: ''For general build instructions, see [[Building]].''<br />
<br />
The ''only'' tricky part is to install the Octave build dependencies. Once that is solved, one can easily follow the [[Building|general build instructions]]. See [[#Configuration|below]] for some Debian and Ubuntu specific configuration options.<br />
<br />
=== Install dependencies ===<br />
<br />
Note that different Debian and Ubuntu versions may have slightly different package names but their differences should be pretty small, mostly limited to version numbers.<br />
<br />
==== The easy way (but likely incorrect) ====<br />
<br />
This approach is ''only'' suitable if you are building from source the ''same'' version that your Linux distribution already has packaged.<br />
<br />
The easy way to install ''most'' of the necessary dependencies is to {{Codeline|sudo apt-get build-dep octave}}. This will install all packages necessary to build and prepare a Debian package for the octave version available on your system repositories. However:<br />
* will install unnecessary packages related to the building of a Debian package;<br />
* may miss some new dependencies;<br />
* may install packages that are no longer octave dependencies.<br />
<br />
==== The right way ====<br />
<br />
The right way is to install all the dependencies listed on the [[Building#Dependencies|Building]] wiki page. One can either search for the respective packages manually on<br />
<br />
* https://packages.debian.org<br />
* https://packages.ubuntu.com<br />
<br />
or, for the sake of convenience, use some "one-liner" to install them:<br />
<br />
* '''Ubuntu 20.04'''<br />
<br />
:<pre>sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev fig2dev libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot-x11 libgraphicsmagick++1-dev libhdf5-dev openjdk-8-jdk libsndfile1-dev llvm-dev texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libsuitesparse-dev texlive-latex-extra libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar qtbase5-dev qttools5-dev qttools5-dev-tools libqscintilla2-qt5-dev libsundials-dev</pre><br />
<br />
[[User:KaKiLa|KaKiLa]] ([[User talk:KaKiLa|talk]]) 03:34, 17 June 2020 (PDT) lpr conflict with cups-bsd<br />
<br />
* '''Ubuntu 19.10'''<br />
<br />
:<pre>sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev fig2dev libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot-x11 libgraphicsmagick++1-dev libhdf5-dev openjdk-8-jdk libsndfile1-dev llvm-dev lpr texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libsuitesparse-dev texlive-latex-extra texlive-libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar qtbase5-dev qttools5-dev qttools5-dev-tools libqscintilla2-qt5-dev libsundials-dev</pre><br />
<br />
* '''Ubuntu 18.04 (LTS)'''<br />
<br />
:<pre>sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot-x11 libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-8-jdk libsndfile1-dev llvm-dev lpr texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libsuitesparse-dev texlive texlive-generic-recommended libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar qtbase5-dev qttools5-dev qttools5-dev-tools libqscintilla2-qt5-dev</pre><br />
<br />
* '''Ubuntu 16.04 (LTS)'''<br />
<br />
:<pre>sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot-x11 libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-8-jdk libsndfile1-dev llvm-dev lpr texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libqt4-opengl-dev libsuitesparse-dev texlive libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar</pre><br />
<br />
* '''Debian 10'''<br />
<br />
:<pre>sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev fig2dev libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot libgraphicsmagick++1-dev libhdf5-dev openjdk-11-jdk libsndfile1-dev llvm-dev texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libjack-jackd2-dev libqhull-dev libqrupdate-dev libqt5core5a qtbase5-dev qttools5-dev qttools5-dev-tools libqscintilla2-qt5-dev libsuitesparse-dev texlive texlive-latex-extra libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar libsundials-dev git</pre><br />
<br />
* '''Debian 9'''<br />
<br />
:<pre>sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-8-jdk libsndfile1-dev llvm-dev texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libjack-jackd2-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libqt4-opengl-dev libsuitesparse-dev texlive libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar</pre><br />
<br />
* '''Debian 8'''<br />
<br />
:<pre>sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-7-jdk libsndfile1-dev llvm-dev lpr texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libqt4-opengl-dev libsuitesparse-dev texlive libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar</pre><br />
<br />
<br />
{{Warning|<ul><li>The Debian repositoriy has several libraries for dealing with HDF data files. The recommended is {{Codeline|libhdf5-serial-dev}}. However, the {{Forge|msh|msh package}} requires [http://www.geuz.org/gmsh/ gmsh] which is incompatible with it.</li><br />
<li>The GraphicsMagick++ library (libgraphicsmagick++1-dev) on the Debian repositories was compiled with quantum 8 which limits reading images to 8 bit. The solution is to recompile [[GraphicsMagick]] with quantum 16 or 32 before building Octave.</li><br />
<li>For debian9 using openjdk-9-jdk (even providing {{Codeline|JAVA_HOME}}) could *not* be used for the java interface! Use openjdk-8-jdk instead.</li><br />
<li>When configure decides to use QT5 instead of QT4, make might fail because lrelease is missing (see [https://savannah.gnu.org/bugs/?50580 bug 50580]). It can be fixed by installing {{Codeline|qttools5-dev-tools}}</li><br />
</ul>}}<br />
<br />
=== Configuration ===<br />
<br />
Some Debian and Ubuntu specific configure tweaks are listed below:<br />
<br />
==== Java ====<br />
<br />
Autodetection for Java should work well on Debian-based systems. A specific Java version can be specified by passing {{codeline|JAVA_HOME}} to configure, for example<br />
<br />
./configure JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64<br />
<br />
==== HDF5 ====<br />
<br />
On older versions of Debian and Ubuntu, you may get the following warning when building an older version of Octave from source:<br />
<br />
HDF5 library not found. Octave will not be able to save or load HDF5 data files.<br />
<br />
The problem is that there are multiple versions of the hdf5 package. Octave was written with the serial version in mind but it is likely to work with the others (OpenMPI and Mpich). Due to the naming scheme done in Debian, it may be required to specify the location of the libraries. See bug {{bug|38928}} for details (starting with comment #19) but basically, use the following when running configure:<br />
<br />
./configure --with-hdf5-includedir=/usr/include/hdf5/serial --with-hdf5-libdir=/usr/lib/x86_64-linux-gnu/hdf5/serial<br />
<br />
On older versions of Debian and Ubuntu, where only one flavor of the HDF5 library could be installed at a time, you may need to build Octave against one of the MPI-enabled flavors. On these older systems, configuring Octave like this may work:<br />
<br />
./configure CPPFLAGS="-I/usr/include/mpi -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX"<br />
<br />
==== Sundials ====<br />
<br />
On recent Debian and Ubuntu releases whose Sundials version (in {{codeline|libsundials-dev}}) is 3.1, a configure flag needs to be passed for {{codeline|ode15i}} and {{codeline|ode15s}} to be compiled with support for sparse Jacobians (bug {{bug|55937}}), as follows:<br />
<br />
./configure CPPFLAGS="-I/usr/include/suitesparse"<br />
<br />
== See also ==<br />
<br />
* [[MXE]] -- a more customized Octave build including many self-compiled tools.<br />
<br />
[[Category:Building]]<br />
[[Category:Installation]]<br />
[[Category:GNU/Linux]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=12422
Image package
2019-11-21T01:29:10Z
<p>Ricardofantin: Included link to imfuse patch discussion</p>
<hr />
<div>The {{Forge|image|image package}} is part of the Octave Forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
<div class="tocinline">__TOC__</div><br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwtraceboundary<br />
* bwulterode<br />
* chromadapt<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* imbinarize<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* [https://savannah.gnu.org/patch/?9717 imapplymatrix]<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* [https://savannah.gnu.org/patch/?9730 imfuse]<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imreducehaze<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* [https://savannah.gnu.org/patch/?9606 integralImage]<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || In Progress<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52959}} || [octave forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|55059}} || [octave forge] (image) Failing unit test for grayslice || In Progress<br />
|-<br />
| {{bug|55202}} || [octave forge] (image) imresize fails for method nearest and image of 1 row || Confirmed<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: [octave forge] (image) multithresh<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9717}}: [octave forge] (image) new function imapplymatrix<br />
* {{patch|9729}}: [octave forge] (image) -- rgb2xyz conversion with adapted whitepoint<br />
* {{patch|9730}}: [octave forge] (image) new function imfuse<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || function is in Octave core || {{bug|53654}} || || Octave version 4.4.0 and above<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| colorangle || 2.10.0 (unreleased) || || || <br />
|-<br />
| lab2double || 2.6.0 || || || <br />
|-<br />
| lab2rgb || 2.6.0 || || || <br />
|-<br />
| lab2uint16 || 2.6.0 || || || <br />
|-<br />
| lab2uint8 || 2.6.0 || || || <br />
|-<br />
| lab2xyz || 2.6.0 || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || 2.8.0 || || || <br />
|-<br />
| rgb2lab || 2.6.0 || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || 2.8.0 || || || <br />
|-<br />
| rgb2xyz || 2.6.0 || || || <br />
|-<br />
| rgb2ycbcr || < 1.0.0|| || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || 2.6.0 || || || <br />
|-<br />
| xyz2rgb || 2.6.0 || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || 2.2.0|| || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || 2.2.0 || || ||<br />
|-<br />
| imnoise || 2.2.2 || || ||<br />
|-<br />
| phantom || 2.6.2 || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || {{patch|9606}} || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || || ||<br />
|- <br />
| wiener2 || 2.8.0|| || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || {{patch|9717}} || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || 2.8.0 || || ||<br />
|- <br />
| imextendedmin || 2.8.0 || || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || 2.8.0 || || ||<br />
|- <br />
| imhmin || 2.8.0 || || ||<br />
|- <br />
| imimposemin || 2.8.0 || || ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Image Transforms ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| dct2 || || || ||<br />
|-<br />
| dctmtx || || || ||<br />
|-<br />
| fanbeam || || || ||<br />
|-<br />
| fan2para || || || ||<br />
|-<br />
| fftshift|| || || ||<br />
|-<br />
| fft2 || || || ||<br />
|-<br />
| hough || || || ||<br />
|-<br />
| houghlines || || || ||<br />
|-<br />
| houghpeaks || || || ||<br />
|-<br />
|idct2 || || || ||<br />
|-<br />
|ifftshift|| || || ||<br />
|-<br />
|ifft2|| || || ||<br />
|-<br />
|iradon|| || || ||<br />
|- <br />
|para2fan|| || || ||<br />
|-<br />
|radon|| || || ||<br />
|-<br />
|}<br />
<br />
=== Graphical Interface Interaction === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| imellipse || - || || ||<br />
|- <br />
| imfreehand || - || || ||<br />
|-<br />
| imline || - || || ||<br />
|-<br />
| immagbox || - || || ||<br />
|-<br />
| imoverview || - || || ||<br />
|-<br />
| imoverviewpanel || - || || ||<br />
|-<br />
| impixelinfo || - || {{patch|8722}} || ||<br />
|-<br />
| impixelinfoval || - || {{patch|8722}} || ||<br />
|-<br />
| impixelregion || - || || ||<br />
|-<br />
| impixelregionpanel || - || || ||<br />
|-<br />
| implay || - || || ||<br />
|-<br />
| impoint || - || || ||<br />
|-<br />
| impoly || - || || ||<br />
|-<br />
| imrect || - || || ||<br />
|-<br />
| imscrollpanel || - || || ||<br />
|-<br />
| iptgetpref || - || || ||<br />
|-<br />
| iptprefs || - || || ||<br />
|-<br />
| iptsetpref || - || || ||<br />
|-<br />
|}<br />
* Obs: implay, iptgetpref, iptprefs, iptsetpref functions are on Basic Display section too...<br />
<br />
[[Category:Octave Forge]]<br />
[[Category:Missing functions]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Zeromq_package&diff=11771
Zeromq package
2019-03-12T23:34:12Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>The {{Forge|zeromq}} package is part of the [[Octave Forge]] project and provides Octave bindings to the ZeroMQ library.<br />
<br />
= Installation =<br />
<br />
== package requirements ==<br />
<br />
The {{Forge|zeromq}} package requires the [http://zeromq.org/ ZeroMQ] libraries and include files to be installed in order to compile.<br />
<br />
for fedora: yum install zeromq-devel<br />
<br />
for ubuntu: apt install libzmq-dev<br />
<br />
== octave installation ==<br />
<br />
With the [http://zeromq.org/ ZeroMQ] library installed, from octave commmand line:<br />
<br />
>> pkg install -forge zeromq<br />
<br />
= Using it =<br />
<br />
Load it before any usage:<br />
<br />
>> pkg load zeromq<br />
<br />
Look at the quick reference for the package:<br />
<br />
>> help zeromq<br />
<br />
== Differences between C and Octave bindings ==<br />
<br />
The Octave binding is a subset of the C binding of the ZeroMQ library.<br />
<br />
Major differences are:<br />
<br />
1. The octave binding creates a single zeromq context that is used for all zeromq sockets. In the C bindings, the programmer must create a context and use it during socket creation.<br />
<br />
2. only limited zmq_getsockopt and zmq_setsockopt is currently implemented.<br />
<br />
3. functions mostly return true or false for whether they succeeded or failed. In the C binding, 0 signified success.<br />
<br />
== The functions ==<br />
<br />
zmq_bind<br />
Bind a zeromq socket to a endpoint.<br />
<br />
zmq_close<br />
Close a zeromq socket.<br />
<br />
zmq_connect<br />
Connect a zeromq socket to a endpoint<br />
<br />
zmq_errno<br />
Get system errno value.<br />
<br />
zmq_getsockopt<br />
Get current value of a zeromq socket option.<br />
<br />
zmq_poll<br />
Poll a socket or sockets for a timeout or incoming data<br />
available.<br />
<br />
zmq_recv<br />
Attempt to read data from a zeromq socket.<br />
<br />
zmq_send<br />
Attempt to send data from a zeromq socket.<br />
<br />
zmq_setsockopt<br />
Set a zeromq socket option.<br />
<br />
zmq_strerror<br />
Get the last zmq error string.<br />
<br />
zmq_unbind<br />
Unbind a previously bound zeromq socket.<br />
<br />
zmq_version<br />
Get the zeromq library version numbers.<br />
<br />
= Examples =<br />
<br />
The zeromq package comes with a number of examples included in it. They can be opened in octave using:<br />
<br />
>> edit examples/zmq_example1.m<br />
<br />
<br />
== basic request/reply pattern ==<br />
<br />
Example based on client/server example from [http://zguide.zeromq.org/page:all#Ask-and-Ye-Shall-Receive http://zguide.zeromq.org/page:all#Ask-and-Ye-Shall-Receive]<br />
<br />
The client sends a "Hello" to the server which responds back "World". No error checking or data validation is done in the example.<br />
<br />
{{Code|Server code|<syntaxhighlight lang="octave" style="font-size:13px"><br />
% zeromq package must be installed and loaded to work<br />
pkg load zeromq<br />
<br />
% dont buffer output<br />
more off<br />
<br />
printf ("Creating hello world server...\n");<br />
<br />
% create reply socket, and bind it to port 5555<br />
sock = zmq_socket (ZMQ_REP);<br />
<br />
zmq_bind (sock, "tcp://*:5555");<br />
<br />
printf ("Waiting for clients ...\n");<br />
<br />
% loop forever, waiting for client requests and responding back <br />
while (true)<br />
recievedata = zmq_recv (sock, 10, 0);<br />
printf ("Received Hello\n");<br />
zmq_send (sock, "World", 5, 0);<br />
endwhile<br />
</syntaxhighlight>}}<br />
<br />
{{Code|Client code|<syntaxhighlight lang="octave" style="font-size:13px"><br />
% zeromq package must be installed and loaded to work<br />
pkg load zeromq<br />
<br />
% dont buffer output<br />
more off<br />
<br />
printf ("Connecting to hello world server...\n");<br />
<br />
<br />
% Create socket and connect to server<br />
<br />
sock = zmq_socket (ZMQ_REQ);<br />
zmq_connect (sock, "tcp://localhost:5555");<br />
<br />
for request_nbr = [1:10]<br />
printf ("Sending Hello %d...\n", request_nbr);<br />
<br />
zmq_send (sock, uint8("Hello"), 5, 0);<br />
<br />
% try to read up to 10 bytes of reply data.<br />
printf ("Waiting for server response %d... (Ctrl-C to exit)\n", request_nbr); <br />
<br />
recieved = zmq_recv (sock, 10, 0);<br />
printf ("Received World %d\n", request_nbr);<br />
endfor<br />
<br />
zmq_close (sock);<br />
</syntaxhighlight>}}<br />
<br />
== basic publish/subscribe pattern ==<br />
<br />
Example based on client/server example from [http://zguide.zeromq.org/page:all#Getting-the-Message-Out http://zguide.zeromq.org/page:all#Getting-the-Message-Out]<br />
<br />
The server pushes 'weather updates' for random zipcodes. The client subscribes to the server just for zipcode 10001.<br />
<br />
{{Code|Server code|<syntaxhighlight lang="octave" style="font-size:13px"><br />
% zeromq package must be installed and loaded to work<br />
pkg load zeromq<br />
<br />
% dont buffer output<br />
more off<br />
<br />
publisher = zmq_socket (ZMQ_PUB);<br />
<br />
rc = zmq_bind (publisher, "tcp://*:5556");<br />
assert (rc);<br />
<br />
while (true) <br />
% Get values that will fool the boss<br />
zipcode = 10000 + randi (20);<br />
temperature = randi (215) - 80;<br />
relhumidity = randi (50) + 10;<br />
<br />
% Send message to all subscribers<br />
update = sprintf ("%05d %d %d", zipcode, temperature, relhumidity);<br />
<br />
zmq_send (publisher, update);<br />
endwhile<br />
<br />
zmq_close (publisher);<br />
</syntaxhighlight>}}<br />
<br />
{{Code|Client code|<syntaxhighlight lang="octave" style="font-size:13px"><br />
% zeromq package must be installed and loaded to work<br />
pkg load zeromq<br />
<br />
% dont buffer output<br />
more off<br />
<br />
subscriber = zmq_socket (ZMQ_SUB);<br />
rc = zmq_connect (subscriber, "tcp://localhost:5556");<br />
assert (rc);<br />
<br />
% Subscribe to zipcode, default is NYC, 10001<br />
zipfilter = "10001 ";<br />
rc = zmq_setsockopt (subscriber, ZMQ_SUBSCRIBE, zipfilter);<br />
assert (rc);<br />
<br />
% Process 100 updates<br />
update_nbr = 0;<br />
total_temp = 0;<br />
<br />
for update_nbr = 1:100<br />
string = char( zmq_recv(subscriber, 128) );<br />
<br />
[zipcode, temperature, relhumidity, count, errmsg] = sscanf (string, "%d %d %d", "C");<br />
<br />
fprintf ("recieved a temp for zipcode '%s' of %dF\n", ...<br />
zipfilter, temperature);<br />
<br />
total_temp += temperature;<br />
endfor<br />
<br />
fprintf ("Average temperature for zipcode '%s' was %dF\n", ...<br />
zipfilter, (total_temp / update_nbr));<br />
<br />
zmq_close (subscriber);<br />
</syntaxhighlight>}}<br />
<br />
<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Sci_cosim&diff=11770
Sci cosim
2019-03-12T23:33:55Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>= Octave-Scilab co-simulation package =<br />
<br />
Toolbox provides the functions for variable exchange between Octave and Scilab workspaces, and for the remote commands execution in Scilab, such as starting xcos simulation.<br />
The main goal of this toolbox is to make an alternative for Simulink in Octave from Scilab xcos. But it can be also used to uses functions from Scilab toolboxes, that are unavailable for Octave.<br />
<br />
== Installation ==<br />
1. Install Octave (version 4.0.0 or higher) and Scilab v.5.5.2 _specifically_ (note: the BackDoor module is currently not supported for the new SciLab v6.0.0 version) <br />
<br />
2. Install the `sockets` package in Octave by executing <br />
<br />
''pkg install -forge sockets''<br />
<br />
3. Download the `sci_cosim` package from https://github.com/amromanov/sci_cosim <br />
<br />
4. Install the `sci_cosim` package in Octave by executing <br />
<br />
''pkg install sci_cosim_0.1.3.tar.gz''<br />
<br />
5. Start the Scilab GUI and install the `Backdoor` toolbox from the main menu: Applications → Module manager - ATOMS → Technical → Backdoor → Install<br />
<br />
6. Restart Scilab. If every thing was done correctly, after restarting there will be a message in the command window "BackDoor: listening to connections on TCP port"<br />
<br />
You _may_ encounter an error that the files "backdoor.start" / "backdoor.quit" cannot be found. This occurs if the files are named e.g. "BackDoor.start" on the disk (i.e. case-sensitive). Simply rename the files to lowercase and restart SciLab.<br />
<br />
== Running demo ==<br />
<br />
1. Download demo from https://github.com/amromanov/sci_cosim/raw/master/demo.tar.gz<br />
<br />
2. Extract it to any folder, where your user has read/write rights<br />
<br />
3. Run Scilab. It doesn't matter for the co-simulation package if you are using GUI version (scilab) or console one (scilab-adv-cli).<br />
<br />
4. Run Octave and change folder to the one, where you have extracted demo<br />
<br />
5. Load the two packages ''pkg load sockets'' and ''pkg load sci_cosim'' in octave.<br />
<br />
6. Run sci_sim_example.m<br />
<br />
== Function description ==<br />
''sci_connect'' - connects to running SciLab with Toolbox Backdoor. It should be used at least once per Octave session.<br />
<br />
''sci_disconnect'' - disconnects from SciLab with Toolbox Backdoor. <br />
<br />
''sci_setvar'' - transfers variables, which names are listed in function arguments, from Octave to Scilab workspace. <br />
<br />
''sci_getvar'' - transfers variables, which names are listed in function arguments, from Scilab to Octave workspace.<br />
<br />
''sci_cmd'' - executes single command in Scilab. <br />
<br />
''sci_sim'' - starts xcos simulation in Scilab. In the most cases, .xcos file should be in the Octave current directory. To set simulation duration use End block in Xcos and transfer its parameter as variable from Octave, using sci_setvar.<br />
<br />
For more detailed usage description execute ''help FUNCTION_NAME'' in Octave.<br />
<br />
== Usage cases ==<br />
In all usage case, described below, user doesn't need to have any knowledge about using Scilab interface and in the most cases he doesn't have to know Scilab scripting language. You can use only Xcos and do the rest of things in Octave. <br />
<br />
1. Simple dynamic systems rapid prototyping. <br />
<br />
In this case you, actually, we need only Xcos. In other cases, described below, we also assume that Xcos is used for dynamic system simulation. The good starting point is to read [http://www.scilab.org/content/download/1107/10095/file/Xcos_beginners.pdf "Xcos for very beginners" guide] (even if you are familiar with Simulink).<br />
<br />
2. Dynamic system rapid prototyping, when systems parameters have to be calculated by script. <br />
<br />
In this case you write and execute all scripts you need using Octave, and then transfer scripts results to Scilab workspace. For example, we have Octave script "calc_pid_params.m" that can tune PID controller parameters and return them as Kp, Ki and Kd variables to Octave workspace. In case we want to use those parameters in Xcos simulation we should run in Octave <br />
<br />
''sci_setvar('Kp','Ki','Kd');''<br />
<br />
After that we can use those varibles in Xcos simulation. Of course, before running ''sci_setvar'', you should setup connection with Scilab using Sciconnect<br />
<br />
3. Dynamic system rapid prototyping, when simulation results should be processed by script. <br />
<br />
In this case we have to move all simulation results you need into Octave workspace and then process them with any Octave script. For example, if your Xcos simulation return two vectors "speed" and "pos", to transfer them into Octave you will need to run<br />
<br />
''sci_getvar('speed','pos');''<br />
<br />
After that two new variables with names "speed" and "pos" will appear in Octave. If there were variables with such name, they will be changed to the ones received from Scilab. After that you can use them, as if they were created in Octave.<br />
<br />
4. Automated Dynamic system simulation<br />
In this case we use Octave scripts for setting up dynamic model parameters and result analysis. The Xcos simulation can be started both from Xcos GUI or from Octave using ''sci_sim'' function. In case of using ''sci_sim'' function the current directory in Octave contain .xcos model file. The current directory in Scilab doesn't matter, because it will be changed automatically. If you don't need Xcos GUI, you can ran Scilab in console mode, it will cause no problem for starting Xcos simulations from Octave. The example of this usage is distributed with Scilab co-simulation package as demo.<br />
<br />
5. Using Scilab co-simulation package to use Scilab toolboxes<br />
<br />
In this case you need to connect to Scilab using ''sci_connect'' function. Transfer function arguments to Scilab workspace with ''sci_setvar'' function. After that you can execute any of Scilab function from Octave with ''sci_cmd''. And when you need to return results from Scilab you have to use ''sci_getvar''. For example, you want to generate key for BlowFish chiper using Scilab Cryptography Toolbox from your Octave script. First of all, you should know, that any call of ''sci_setvar'', ''sci_getvar'' or ''sci_sim'' command will change Scilab current folder to the same you use in Octave, but ''sci_cmd'' won't. That means, if you use only sci_cmd function, you should change Scilab current folder, before running any scripts. It can be done directly from Octave by transferring any variable to Scilab using ''sci_setvar'' or with command <br />
<br />
''sci_cmd(['cd ' pwd]);''<br />
<br />
After current folder in Scilab and Octave are synchronized you can generate the key by Octave command:<br />
<br />
''sci_cmd('keyGen_blowfish("sampleKey", "sampleIV", "samplePublicKey", "samplePrivateKey");');''<br />
<br />
As with Octave, Scilab is initially distributed without any toolboxes. That means, before using Scilab Cryptography Toolbox or any other toolbox for Scilab you need to install it with ATOMS manager.<br />
<br />
== How to Run and Change an Xcos diagram ==<br />
<br />
1) After installing Scilab and and the sci_cosim package and getting the Toolbox Backdoor for Scilab to work, then you can try this help section.<br />
<br />
2) Download examples from the GitHub<br />
https://github.com/amromanov/sci_cosim/raw/master/demo.tar.gz<br />
<br />
3) Click in the sci_pid_model.zcos file to start Scilab and Xcos You should see a diagram of the control system.<br />
<br />
4) Open the sci_pid_example.m file in your octave editor.<br />
<br />
5) Run the sci_pid_example.m file <br />
<br />
You should see a plot that has the output of the plant with no feedback, and the output of the plant in the feedback loop and the control action signal that has been clipped at 5 volts.<br />
<br />
6) You can then play with the PID parameters in the M file and see how they affect the output.<br />
<br />
7) In the loop diagram in Xcos click in the "SATURATION"(clipper) box and change the clipping to be 10 Volts <br />
<br />
8) Rerun the M file and retune the PID.<br />
<br />
9) Now for a little harder problem. Lets change the plant parameters to (s+1)*(s+5)<br />
<br />
If you just click on the plant and try and do this, Xcos might complain that it doesn't know what k is, if this happens you have to first go to the Scilab main window and put k=1 there. k will be changed from your M file later. Now you will be able to change the plant in both locations.<br />
<br />
10) In the sci_pid_example.m file set k=5 and run the new system<br />
<br />
11) Now lets add a time delay in the feedback part of the loop.<br />
<br />
11.1) Click on the wire that goes from the output of the plant back to an input of the summing junction. This should highlight the line as dashes.<br />
<br />
11.2) Press the delete button to delete this wire.<br />
<br />
11.3) Select the "view" menu tab at the top of the Xcos diagram.<br />
<br />
11.4) Select the "palette browser"<br />
<br />
11.5) In the new pop up window select "Continuous time systems" then scroll down, select and move to the diagram, the "TIME_DELAY" box.<br />
<br />
11.6) The input and outputs are on the wrong side, so we will mirror it.<br />
<br />
Right click on the box and the select" format" and "Mirror"<br />
<br />
11.7) Move the box to a convenient place to rewire it in the feedback loop,<br />
<br />
11.8) Now rewire it:<br />
<br />
On the left side of the delay box is an output black arrow point, click on this and drag the mouse to the left until you are to the left of the summing junction box.<br />
<br />
Now let go of the left button and move the mouse pointer up to the height of the input pin of the summing box.<br />
<br />
Click the left button to place a corner in the wire.<br />
<br />
Now move to the input pin until you get a green box around the input pin.<br />
<br />
Click the left mouse button again to make the connection.<br />
<br />
11.9) We now have to join a wire to an existing wire.<br />
<br />
Place the mouse pointer on the wire from the output of the plant.<br />
<br />
The wire should be highlighted but not selected.<br />
<br />
Hold the left mouse button down and start drawing a wire.<br />
<br />
Join it to the input of the delay<br />
<br />
12) Double click on the delay box and change the delay to be .1 seconds.<br />
<br />
13) Save your new model with a new name.<br />
<br />
14) In the M file change the line:<br />
sci_sim('sci_pid_model.zcos'); %Running xcos simulation<br />
to<br />
sci_sim('newname.zcos'); %Running xcos simulation<br />
<br />
15) Rerun the M file and have fun tuning the PID.<br />
<br />
== Author and Licensing ==<br />
Author: Romanov Alexey (romanov at mirea.ru)<br />
<br />
Moscow, Control Problems Department MIREA, 2015<br />
<br />
Distributed under the New BSD License<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Video_package&diff=11769
Video package
2019-03-12T23:33:31Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>The {{Forge|video}} package is part of the [[Octave Forge]] project and tries to implement the video functions from matlab. It should compile with ffmpeg and libav.<br />
<br />
= Installation =<br />
<br />
== on Debian Jessie using "pkg -forge" ==<br />
<br />
sudo apt-get install libavutil-dev libavformat-dev libswscale-dev libavcodec-dev<br />
<br />
On the Octave prompt:<br />
<br />
>> pkg install -forge video<br />
<br />
== on CentOS Linux release 7.2.1511 (Core) with GNU Octave Version 3.8.2 ==<br />
<br />
yum install octave-devel<br />
yum install libvorbis yasm freetype zlib bzip2 faac lame speex libvpx libogg libtheora x264 XviD openjpeg15 opencore-amr<br />
wget https://libav.org/releases/libav-11.4.tar.gz<br />
tar xzf libav-11.4.tar.gz<br />
cd libav-11.4<br />
./configure --enable-pic<br />
make -j 4<br />
<br />
as root:<br />
<br />
make install<br />
<br />
On the Octave prompt:<br />
<br />
>> pkg install -forge video<br />
<br />
== On Windows ==<br />
<br />
The MXE builds >= 4.0.1-rc3 already includes the ffmpeg libs so video should run out of the box.<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=TISEAN_package&diff=11768
TISEAN package
2019-03-12T23:33:25Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>== Porting TISEAN ==<br />
<br />
This section which focuses on demonstrating how the package is to be ported and what is the current state of that process is located in [[TISEAN_package:Procedure]].<br />
<br />
== Tutorials ==<br />
These tutorials are based on examples, tutorials and the articles located on the TISEAN website:<br/> [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/ http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/].<br/><br />
This tutorial will utilize the following dataset:<br />
* [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/tutorial/amplitude.dat amplitude.dat]<br />
Please download it as the tutorial will reference it.<br />
=== False Nearest Neighbors ===<br />
This function uses a method to determine the minimum sufficient embedding dimension. It is based on the [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/node9.html#SECTION00032200000000000000 False Nearest Neighbors] section of the TISEAN documentation. As a demonstration we will create a plot that contains an Ikeda Map, a Henon Map and a Henon Map corrupted by 10% of Gaussian noise.<br />
{{Code|Analyzing false nearest neighbors|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Create maps<br />
ikd = ikeda (10000);<br />
hen = henon (10000);<br />
hen_noisy = hen + std (hen) * 0.02 .* (-6 + sum (rand ([size(hen), 12]), 3));<br />
# Create and plot false nearest neighbors<br />
[dim_ikd, frac_ikd] = false_nearest (ikd(:,1));<br />
[dim_hen, frac_hen] = false_nearest (hen(:,1));<br />
[dim_hen_noisy, frac_hen_noisy] = false_nearest (hen_noisy(:,1));<br />
plot (dim_ikd, frac_ikd, '-b*;Ikeda;',...<br />
dim_hen, frac_hen, '-r+;Henon;',...<br />
dim_hen_noisy, frac_hen_noisy, '-gx;Henon Noisy;');<br />
</syntaxhighlight>}}<br />
The {{Codeline|dim_*}} variables hold the dimension (so here 1:5), and {{Codeline|frac_*}} contain the fraction of false nearest neighbors. From this chart we can obtain the sufficient embedding dimension for each system. For a Henon Map {{Codeline|m &#61; 2}} is sufficient, but for an Ikeda map it is better to use {{Codeline|m &#61; 3}}.<br />
[[File:tisean_false_neigh.png|400px|center]]<br />
<br />
=== Finding Unstable Periodic Orbits ===<br />
Here I will demonstrate how to find unstable periodic orbits. This section is based on the TISEAN documentation chapter [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/node19.html#SECTION00053000000000000000 Finding unstable periodic orbits]. We will start by finding these orbits using function {{Codeline|upo}}.<br />
{{Code|Finding unstable periodic orbits|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Create maps<br />
hen = henon (1000);<br />
hen = hen + std (hen) * 0.02 .* (-6 + sum (rand ([size(hen), 12]), 3));<br />
# Find orbits<br />
[lengths, data] = upo(hen(:,1), 2, 'p',6,'v',0.1, 'n', 100);<br />
</syntaxhighlight>}}<br />
The vector {{Codeline|lengths}} contains the size of each of the found orbits and {{Codeline|data}} contains their coordinates. To obtain delay coordinates and plot these orbits onto the original data we will use {{Codeline|upoembed}}.<br />
{{Code|Plotting unstable periodic orbits|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Create delay coordinates for the orbits and data<br />
up = upoembed (lengths, data, 1);<br />
delay_hen = delay (hen(:,1));<br />
# Plot all of the data<br />
plot (delay_hen(:,1), delay_hen(:,2), 'r.;Noisy Henon;','markersize',2,...<br />
up{4}(:,1), up{4}(:,2),'gx;Fixed Point;','markersize',20,'linewidth',1, ...<br />
up{3}(:,1), up{3}(:,2),'b+;Period 2;','markersize',20,'linewidth',1, ...<br />
up{2}(:,1), up{2}(:,2),'ms;Period 6;','markersize',20,'linewidth',1, ...<br />
up{1}(:,1), up{1}(:,2),'cs;Period 6;','markersize',20,'linewidth',1);<br />
</syntaxhighlight>}}<br />
[[File:Upo.png|400px|center]]<br />
The plotting options are passed to make the orbits more visible.<br />
<br />
=== Nonlinear Prediction ===<br />
In this section we will demonstrate some functions from the 'Nonlinear Prediction' chapter of the TISEAN documentation (located [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/node16.html#SECTION00050000000000000000 here]). For now this section will only demonstrate functions that are connected to the [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/node18.html#SECTION00052000000000000000 Simple Nonlinear Prediction] section. <br/><br />
There are three functions in this section: {{Codeline|lzo_test}}, {{Codeline|lzo_gm}} and {{Codeline|lzo_run}}. The first is used to estimate the forecast error for a set of chosen parameters, the second gives some global information about the fit and the third produces predicted points. Let us start with the first one (before starting this example remember to download 'amplitude.dat' from above and start Octave in the directory that contains it). The pairs of parameters {{Codeline|(m,d)}} where chosen after the TISEAN documentation.<br />
{{Code|Analyzing forecast errors for various parameters|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Load data<br />
load amplitude.dat<br />
# Create different forecast error results<br />
steps = 200;<br />
res1 = lzo_test (amplitude(1:end-200), 'm', 2, 'd', 6, 's', steps);<br />
res2 = lzo_test (amplitude(1:end-200), 'm', 3, 'd', 6, 's', steps);<br />
res3 = lzo_test (amplitude(1:end-200), 'm', 4, 'd', 1, 's', steps);<br />
res4 = lzo_test (amplitude(1:end-200), 'm', 4, 'd', 6, 's', steps);<br />
plot (res1(:,1), res1(:,2), 'r;m = 2, d = 6;', ...<br />
res2(:,1), res2(:,2), 'g;m = 3, d = 6;',...<br />
res3(:,1), res3(:,2), 'b;m = 4, d = 1;',...<br />
res4(:,1), res4(:,2), 'm;m = 4, d = 6;');<br />
</syntaxhighlight>}}<br />
[[File:tisean_nl_prediction.png|400px|center]]<br />
<br />
It seems that the last pair {{Codeline|(m &#61; 4, d &#61; 6)}} is suitable. We will use it to determine the the best neighborhood to use when generating future points.<br />
{{Code|Determining the best neighborhood size using lzo_gm|<syntaxhighlight lang="octave" style="font-size:13px"><br />
gm = lzo_gm (amplitude(1:end-200), 'm', 4, 'd', 6, 's', steps, 'rhigh', 20);<br />
</syntaxhighlight>}}<br />
After analyzing {{Codeline|gm}} it is easy to observe that the least error is for the first neighborhood size of {{Codeline|gm}} which is equal to 0.49148. We will use it to produce the prediction vectors. Only the first 4800 datapoints from {{Codeline|amplitude}} are used in order to compare the predicted values with the actual ones for the last 200 points.<br />
{{Code|Creating forecast points|<syntaxhighlight lang="octave" style="font-size:13px"><br />
steps = 200;<br />
forecast = lzo_run (amplitude(1:end-200), 'm', 4, 'd', 6, 'r', 0.49148, 'l', steps);<br />
forecast_noisy = lzo_run (amplitude(1:end-200), 'm', 4, 'd', 6, 'r', 0.49148, ...<br />
'dnoise', 10, 'l', steps);<br />
plot (amplitude(end-199:end), 'g;Actual Data;', ...<br />
forecast, 'r.;Forecast Data;',...<br />
forecast_noisy, 'bo;Forecast Data with 10% Dynamic Noise;');<br />
</syntaxhighlight>}}<br />
[[File:tisean_nl_prediction_2.png|400px|center]]<br />
<br />
The difference between finding the proper {{Codeline|r}} and not finding it can be very small. <br/><br />
The produced data is the best local zeroth order fit on the {{Codeline|amplitude.dat}} for {{Codeline|(m &#61; 4, d &#61; 6)}}.<br />
<br />
=== Nonlinear Noise Reduction ===<br />
This tutorial show different methods of the 'Nonlinear Noise Reduction' section of the TISEAN documentation (located [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/node22.html#SECTION00060000000000000000 here]). It shows the use of simple nonlinear noise reduction (function {{Codeline|lazy}}) and locally projective nonlinear noise reduction (function {{Codeline|ghkss}}). To start let's create noisy data to work with.<br />
{{Code|Creating a noisy henon map|<syntaxhighlight lang="octave" style="font-size:13px"><br />
hen = henon (10000);<br />
hen = hen(:,1); # We only need the first column<br />
hen_noisy = hen + std (hen) * 0.02 .* (-6 + sum (rand ([size(hen), 12]), 3));<br />
</syntaxhighlight>}}<br />
This created a Henon map contaminated by 2% Gaussian noise à la TISEAN. In the tutorials and exercises on the TISEAN website this would be equivalent to calling {{Codeline|makenoise -%2}} on the Henon map.<br/><br />
Next we will reduce the noise using simple nonlinear noise reduction {{Codeline|lazy}}.<br />
{{Code|Simple nonlinear noise reduction|<syntaxhighlight lang="octave" style="font-size:13px"><br />
clean = lazy (hen_noisy,7,-0.06,3);<br />
# Create delay vectors for both the clean and noisy data<br />
delay_clean = delay (clean);<br />
delay_noisy = delay (hen_noisy);<br />
# Plot both on one chart<br />
plot (delay_noisy(:,1), delay_noisy(:,2), 'b.;Noisy Data;','markersize',3,...<br />
delay_clean(:,1), delay_clean(:,2), 'r.;Clean Data;','markersize',3)<br />
</syntaxhighlight>}}<br />
[[File:tisean_nl_noisereduction.png|400px|center]]<br />
<br />
On the chart created the red dots represent cleaned up data. It is much closer to the original than the noisy blue set.<br/><br />
Now we will do the same with {{Codeline|ghkss}}.<br />
{{Code|Locally projective nonlinear noise reduction|<syntaxhighlight lang="octave" style="font-size:13px"><br />
clean = ghkss (hen,'m',7,'q',2,'r',0.05,'k',20,'i',2);<br />
</syntaxhighlight>}}<br />
The rest of the code is the same as the code used in the {{Codeline|lazy}} example. <br/><br />
Once both results are compared it is quite obvious that for this particular example {{Codeline|ghkss}} is superior to {{Codeline|lazy}}. The TISEAN documentation points out that this is not always the case.<br />
[[File:tisean_nl_noisereduction_2.png|400px|center]]<br />
<br />
=== Lyapunov Exponents ===<br />
Here I will demonstrate how to use the function {{Codeline|lyap_k}}. It estimates the maximal Lyapunov exponent from a time series (more information available from the TISEAN documentation located [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/node27.html here]). In this tutorial we will estimate the maximal Lyapunov exponent for various embedding dimensions and then plot them. <br />
{{Code|Creating Lyapunov exponents|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Create time series<br />
in = sin((1:2500).'./360) + cos((1:2500).'./180);<br />
# Estimate Lyapunov exponents<br />
mmax_val = 20<br />
lyap_exp = lyap_k (in, 'mmin',2,'mmax',mmax_val,'d',6,'s',400,'t',500);<br />
</syntaxhighlight>}}<br />
In this function the output ({{Codeline|lyap_exp}} is a {{Codeline|5 x 20}} struct array. We will only use one row for the plot.<br />
{{Code|Plotting Lyapunov exponents|<syntaxhighlight lang="octave" style="font-size:13px"><br />
cla reset<br />
hold on<br />
for j=2:mmax_val<br />
plot (lyap_exp(1,j-1).exp(:,1),lyap_exp(1,j-1).exp(:,2),'r');<br />
endfor<br />
xlabel ("t [flow samples]");<br />
ylabel ("S(eps, embed, t)");<br />
hold off<br />
</syntaxhighlight>}}<br />
[[File:lyap_k.png|400px|center]]<br />
<br />
=== Dimensions and Entropies ===<br />
This section is discussed on the [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/node29.html#SECTION00080000000000000000 TISEAN documentation page]. One of the functions discussed is {{Codeline|d2}}. It is used to estimate the correlation sum, correlation dimension and correlation entropy of a time series. The time series used here will be the Henon map.<br />
{{Code|Calculation correlation sum, dimension and entropy|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Create maps<br />
hen = henon (10000);<br />
# Calculate the correlation sum, dimension and entropy<br />
vals = d2 (hen, 'd', 1, 'm', 5, 't',50);<br />
# Plot correlation sum<br />
subplot (2,3,1)<br />
do_plot_corr = @(x) loglog (x{1}(:,1),x{1}(:,2),'b');<br />
hold on<br />
arrayfun (do_plot_corr, {vals.c2});<br />
hold off<br />
xlabel ("Epsilon")<br />
ylabel ("Correlation sums")<br />
title ("c2");<br />
# Plot correlation entropy<br />
subplot (2,3,4)<br />
do_plot_entrop = @(x) semilogx (x{1}(:,1),x{1}(:,2),'g');<br />
hold on<br />
arrayfun (do_plot_entrop, {vals.h2});<br />
hold off<br />
xlabel ("Epsilon")<br />
ylabel ("Correlation entropies");<br />
title ("h2")<br />
# Plot correlation dimension<br />
subplot (2,3,[2 3 5 6])<br />
do_plot_slope = @(x) semilogx (x{1}(:,1),x{1}(:,2),'r');<br />
hold on<br />
arrayfun (do_plot_slope, {vals.d2});<br />
hold off<br />
xlabel ("Epsilon")<br />
ylabel ("Local slopes")<br />
title ("d2");<br />
</syntaxhighlight>}}<br />
[[File:d2_out.png|400px|center]]<br />
The output of {{Codeline|d2}} can be further processed using the following functions: {{Codeline|av_d2}}, {{Codeline|c2t}}, {{Codeline|c2g}}. This tutorial will show how to use {{Codeline|av_d2}} which smooths the output of {{Codeline|d2}} (usually used to smooth the "{{Codeline|d2}}" field of the output).<br />
{{Code|Smooth output of d2|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Smooth d2 output<br />
figure 2<br />
smooth = av_d2 (vals,'a',2);<br />
# Plot the smoothed output<br />
do_plot_slope = @(x) semilogx (x{1}(:,1),x{1}(:,2),'b');<br />
hold on<br />
arrayfun (do_plot_slope, {smooth.d2});<br />
hold off<br />
xlabel ("Epsilon")<br />
ylabel ("Local slopes")<br />
title ("Smooth");<br />
</syntaxhighlight>}}<br />
[[File:tisean_av_d2_out.png|400px|center]]<br />
Optionally the line "{{Codeline|figure 2}}" can be omitted, which will cause the smoothed version to be superimposed on the "raw" version that came straight from {{Codeline|d2}}.<br />
<br />
=== Testing for Nonlinearity ===<br />
This section is discussed on the [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/node35.html#SECTION00090000000000000000 TISEAN documentation page]. The focus of this section will be the function {{Codeline|surrogates}}. It uses surrogate data to determine weather data is nonlinear. Let us first create the input data which will be a stationary Gaussian linear stochastic process. It is measured by {{Codeline|s(xn) &#61; xn^3}}. We then run it through {{Codeline|surrogates}} and plot the data.<br />
{{Code|Creating data from Gaussian process|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Create Gaussian process data<br />
g = zeros (2000,1);<br />
for i = 2:2000<br />
g(i) = 0.7 * g(i-1) + (-6 + sum (rand ([size(1), 12]), 3));<br />
endfor<br />
# Create a measurement of it<br />
spike = g.^3;<br />
# Create the surrogate<br />
sur = surrogates (spike);<br />
# Plot the data<br />
subplot (2,1,1)<br />
plot (spike,'g');<br />
title ("spike")<br />
subplot (2,1,2)<br />
plot (sur,'b');<br />
title ("surrogate")<br />
</syntaxhighlight>}}<br />
<br />
[[File:surrogate_tutorial.png|400px|center]]<br />
It is crucial that the length of the input to surrogates is factorizable by only 2,3 and 5. Therefore, if it is not the excess of data is truncated accordingly. Padding with zeros is not allowed. To solve this problem one can use {{Codeline|endtoend}}, and choose the best subset of the input data to be used to generate a surrogate.<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]<br />
<br />
== External links ==<br />
* [https://bitbucket.org/josiah425/tisean Bitbucket repository ] where the porting is taking place.<br />
* [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/ TISEAN package website] where the package is described along with references to literature, tutorials and manuals.</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Symbolic_package&diff=11767
Symbolic package
2019-03-12T23:32:53Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>The {{Forge|symbolic|symbolic package}} is part of the [[Octave Forge]] project.<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]<br />
<br />
=== Demos and usage examples ===<br />
<br />
* '''I'm trying to substitute a double value into an expression. How can I avoid getting "warning: Using rat() heuristics for double-precision input (is this what you wanted?)".'''<br />
<br />
In general, you should be very careful when converting floating point ("doubles") to symbolic variables, that's why the warning is bothering you.<br />
<br />
<source lang="octave"><br />
<br />
## Demo of how to use a number (which was calculated in an octave<br />
## variable) in a symbolic calculation, without getting a warning.<br />
<br />
## use octave to calculate some number:<br />
a = pi/2<br />
<br />
## now do some work with the symbolic pkg<br />
syms x<br />
f = x * cos (x)<br />
df = diff (f)<br />
<br />
## Now we want to evaluate df at a:<br />
<br />
# subs (df, x, a) # this gives the "rats" warning (and gives a symbolic answer)<br />
<br />
## So instead, try<br />
<br />
dfh = function_handle (df)<br />
<br />
dfh (a)<br />
<br />
ans = -1.5708<br />
<br />
<br />
## And you can evaluate dfh at an array of "double" values:<br />
<br />
dfh ([1.23 12.3 pi/2])<br />
<br />
ans =<br />
-0.82502 4.20248 -1.57080<br />
<br />
</source><br />
<br />
<br />
<br />
* '''Demo of how to graph symbolic functions (by converting SYMBOLIC functions into ANONYMOUS functions)'''<br />
<br />
<source lang="octave"><br />
<br />
## The following code will produce the same vector field plot as Figure 1.14 from Example 1.6 (pg. 39) from A Student's Guide to Maxwell's Equations by Dr. Daniel Fleisch.<br />
<br />
## Make sure symbolic package is loaded and symbolic variables declared.<br />
pkg load symbolic<br />
syms x y<br />
<br />
## Write a Vector Field Equation in terms of symbolic variables <br />
vectorfield = [sin(pi*y/2); -sin(pi*x/2)];<br />
<br />
## Vector components are converted from symbolic into "anonymous functions" which allows them to be graphed.<br />
## The "'vars', [x y]" syntax ensures each component is a function of both 'x' & 'y'<br />
iComponent = function_handle (vectorfield(1), 'vars', [x y]); <br />
jComponent = function_handle (vectorfield(2), 'vars', [x y]); <br />
<br />
## Setup a 2D grid<br />
[X,Y] = meshgrid ([-0.5:0.05:0.5]);<br />
<br />
figure<br />
quiver (X, Y, iComponent (X, Y), jComponent (X,Y))<br />
<br />
</source><br />
<br />
<br />
* '''Demo of Anonymous function to symbolic function and back to anonymous function and then the use of the interval pkg.'''<br />
<br />
<source lang="octave"><br />
% this is just a formula to start with,<br />
% have fun and change it if you want to.<br />
<br />
f = @(x) x.^2 + 3*x - 1 + 5*x.*sin(x);<br />
<br />
% these next lines take the Anonymous function into a symbolic formula<br />
<br />
pkg load symbolic<br />
syms x;<br />
ff = f(x);<br />
<br />
% now calculate the derivative of the function<br />
<br />
ffd = diff(ff, x);<br />
<br />
% and convert it back to an Anonymous function<br />
<br />
df = function_handle(ffd)<br />
<br />
<br />
% this uses the interval pkg to find all the roots between -15 an 10 <br />
<br />
pkg load interval<br />
fzero (f, infsup (-15, 10), df)<br />
<br />
ans ⊂ 4×1 interval vector<br />
<br />
[-5.743488743719015, -5.743488743719013]<br />
[-3.0962279604822407, -3.09622796048224]<br />
[-0.777688831121563, -0.7776888311215626]<br />
[0.22911205809043574, 0.2291120580904359]<br />
</source><br />
<br />
<br />
* '''Demo of inputting a function at the input prompt and making an Anonymous function.'''<br />
<br />
<source lang="octave"><br />
# This prog. shows how to take a<br />
# string input and make it into an anonymous function<br />
# this uses the symbolic pkg.<br />
disp("Example input")<br />
disp("x^2 + 3*x - 1 + 5*x*sin(x)")<br />
str_fucn=input("please enter your function ","s")<br />
fucn_sym=sym(str_fucn)<br />
f=function_handle(fucn_sym)<br />
# now back to symbolic<br />
syms x;<br />
ff=formula(f(x));<br />
% now calculate the derivative of the function <br />
ffd=diff(ff);<br />
% and convert it back to an Anonymous function<br />
df=function_handle(ffd)<br />
% now lets do the second derivative<br />
ffdd=diff(ffd);<br />
ddf=function_handle(ffdd)<br />
% and now plot them all <br />
x1=-2:.0001:2;<br />
plot(x1,f(x1),x1,df(x1),x1,ddf(x1))<br />
grid minor on<br />
legend("f","f '", "f '' ")<br />
</source><br />
<br />
<br />
* '''Demo of ODE with a step input and initial conditions.'''<br />
<br />
<source lang="octave"><br />
<br />
## This is a demo of a second order transfer function and a unit step input.<br />
## in laplace we would have 1 1<br />
## _______________ * _____<br />
## s^2 + sqrt(2)*s +1 s<br />
##<br />
## So the denominator is s^3 + sqrt(2) * s^2 + s<br />
# and for laplace initial conditions area<br />
## t(0)=0 t'(0) =0 and the step has initial condition of 1<br />
## so we set t''(0)=1<br />
## In the code we use diff(y,1)(0) == 0 to do t'(0)=0<br />
##<br />
## I know that all this can be done using the control pkg<br />
## But I used this to verify that this solution is the<br />
## same as if I used the control pkg.<br />
## With this damping ratio we should have a 4.321% overshoot.<br />
##<br />
syms y(x) <br />
sqrt2=sym(1.41421);<br />
de =diff(y, 3 ) +sqrt2*diff(y,2) + diff(y) == 0;<br />
f = dsolve(de, y(0) == 0, diff(y,1)(0) == 0 , diff(y,2)(0) == 1)<br />
ff=function_handle(rhs(f))<br />
x1=0:.01:10;<br />
y=ff(x1);<br />
plot(x1,y)<br />
grid minor on <br />
<br />
</source></div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Sockets_package&diff=11766
Sockets package
2019-03-12T23:32:17Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>= Networking in Octave =<br />
To communicate over network with TCP/IP, one can use the sockets package.<br />
Easiest way to install it is <br />
<pre>pkg -forge install sockets</pre><br />
<br />
See the {{Forge|sockets|package page}} for documentation.<br />
<br />
== Examples ==<br />
(connect to a web server?)<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Parallel_package&diff=11765
Parallel package
2019-03-12T23:32:06Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>The Parallel execution package provides utilities to work with clusters, but also functions to parallelize work among cores of a single machine.<br />
<br />
To install: {{Codeline|pkg install -forge parallel}}<br />
<br />
And then, once on each octave session, {{Codeline|pkg load parallel}}<br />
<br />
== multicore parallelization (parcellfun, pararrayfun) ==<br />
<br />
<br />
See also the [[NDpar package]], for an extension of these functions to N-dimensional arrays<br />
<br />
=== calculation on a single array ===<br />
<br />
{{Code|simple|<pre><br />
# fun is the function to apply <br />
fun = @(x) x^2;<br />
<br />
vector_x = 1:10;<br />
<br />
vector_y = pararrayfun(nproc, fun, vector_x)<br />
</pre><br />
}}<br />
<br />
should output<br />
<br />
<code><pre><br />
parcellfun: 10/10 jobs done<br />
<br />
vector_y =<br />
<br />
1 4 9 16 25 36 49 64 81 100<br />
</pre></code><br />
<br />
{{Codeline|nproc}} returns the number of cpus available (number of cores or twice as much with hyperthreading). One can use {{Codeline|nproc - 1}} instead, in order to leave one cpu free for instance.<br />
<br />
{{Codeline|fun}} can be replaced by {{Codeline|@myfun}} if the function resides in the {{Codeline|myfun.m}} file.<br />
<br />
In the previous example, the function was executed once for each element of the input {{Codeline|vector_x}}.<br />
If the function is vectorized (can act on a vector and not just on scalar input), then it can be much more efficient to use the {{Codeline|"Vectorized", true}} option.<br />
<br />
{{Code|vectorized|<pre><br />
# fun is the function to apply, vectorized (see the dot)<br />
fun = @(x) x.^2;<br />
<br />
vector_x = 1:10;<br />
<br />
vector_y = pararrayfun(nproc, fun, vector_x, "Vectorized", true, "ChunksPerProc", 1)<br />
</pre><br />
}}<br />
should output<br />
<br />
<code><pre><br />
parcellfun: 4/4 jobs done<br />
vector_y =<br />
<br />
1 4 9 16 25 36 49 64 81 100<br />
</pre></code><br />
<br />
The {{Codeline|"ChunksPerProc"}} option is mandatory with {{Codeline|"Vectorized", true}}. {{Codeline|1}} means that each proc will do its job in one shot (chunk). This number can be increased to use less memory for instance. A higher number of {{Codeline|"ChunksPerProc"}} allows also more flexibility in case of long calculations on a busy machine. If one cpu has finished all its jobs, it can take over the pending jobs of another.<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]<br />
<br />
=== Output in cell arrays ===<br />
<br />
The following sample code was an answer to [http://stackoverflow.com/questions/27422219/for-every-row-reshape-and-calculate-eigenvectors-in-a-vectorized-way this question]. The goal was to diagonalize 2x2 matrices contained as rows of a 2d array (each row of the array being a flattened 2x2 matrix).<br />
<br />
{{code|diagonalize NxN matrices contained in an array|<br />
<pre><br />
A = [0.6060168 0.8340029 0.0064574 0.7133187;<br />
0.6325375 0.0919912 0.5692567 0.7432627;<br />
0.8292699 0.5136958 0.4171895 0.2530783;<br />
0.7966113 0.1975865 0.6687064 0.3226548;<br />
0.0163615 0.2123476 0.9868179 0.1478827];<br />
<br />
N = 2;<br />
[eigenvectors, eigenvalues] = pararrayfun(nproc, <br />
@(row_idx) eig(reshape(A(row_idx, :), N, N)), <br />
1:rows(A), "UniformOutput", false)<br />
</pre><br />
}}<br />
<br />
With {{codeline|"UniformOutput", false}}, the outputs are contained in cell arrays (one cell per slice). In the sample above, both {{codeline|eigenvectors}} and {{codeline|eigenvalues}} are {{codeline|1x5}} cell arrays.<br />
<br />
== cluster operation ==<br />
<br />
Documentation can be found in the {{codeline|README.parallel}} or {{codeline|README.bw}} files, located inside the {{codeline|doc}} directory of the parallel package.</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Ocs_package&diff=11764
Ocs package
2019-03-12T23:31:15Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>= OCS : Octave Circuit Simulator =<br />
__TOC__<br />
== History and Motivation ==<br />
<br />
OCS was developed during the CoMSON (Coupled Multiscale Simulation and Optimization) project which involved several universities but also several industrial partners.<br />
<br />
Each of the industrial partners at the time was using its own circuit simulation software and each software had different file formats for circuit netlists.<br />
<br />
Given the purposes of the project and the composition of the consortium the main design objectives for OCS where<br />
<br />
* provide a format for "element evaluators" independent of time-stepping algorithms<br />
* provide a "hierarchical" data structure where elements could be composed themselves of lumped-element networks<br />
* allow coupling of lumped-element networks (0D) and 1D/2D/3D device models<br />
* use an intermediate/interchange file format so that none of the formats in use by the industrial partners would be favoured over the others<br />
* be written in an interpreted language for quick prototyping and easy maintainance<br />
* be Free Software<br />
<br />
== Problem Formulation ==<br />
<br />
The circuit description in OCS is based on (a variant of) modified nodal analysis (MNA) model for lumped-element networks.<br />
It is easy to verify that the common charge/flux-based MNA model is a special case of the model presented below. <br />
<br />
We consider a circuit with M elements and N nodes, the core of the MNA model is a set of N equations of the form<br />
<math><br />
\sum_{{m}=1}^{M} F_{mn} = 0<br />
\qquad<br />
n = 1, \, \ldots \, ,N<br />
</math><br />
<br />
where <math>F_{mn}</math> denotes the current from the node n due to element m. <br />
<br />
The equations above are the Kirchhoff current law (KCL) for each of the electrical nodes of the network.<br />
<br />
The currents can be expressed in terms of the node voltages <math>e</math> and the internal variables <math>r_m \; (m = 1\ldots M)</math><br />
<br />
<math><br />
F_{mn} =<br />
A_{mn} \dot{r}_{m} + J_{mn} \left({e}, {r}_{m} \right)<br />
\qquad<br />
\begin{array}{l}<br />
n = 1, \, \ldots \, ,N \\<br />
m = 1, \, \ldots \, ,M<br />
\end{array}<br />
</math><br />
<br />
Notice that the variables <math>{{r}}_{m}</math> only appear in the equations defining the fluxes relative to the m-th element, for this reason they are sometimes referred to as internal variables of the m-th element.<br />
<br />
The full MNA model is finally obtained by substituting the current definitions in the KCL and complementing it with a suitable number <math>I_{m}</math> of constitutive relations for the internal variables of each element<br />
<math><br />
\sum_{{m}=1}^{M} \left[<br />
\ A_{mn} \dot{{r}}_{m} +<br />
J_{mn} \left( {e}, {r}_{m} \right)<br />
\right] = 0<br />
\qquad <br />
\begin{array}{l}<br />
{n} = 1, \, \ldots \, ,N <br />
\end{array}<br />
</math><br />
<br />
<math><br />
B_{mi} \dot{{r}}_{m} +<br />
Q_{mi}\ \left( {e}, {r}_{m} \right) = 0 \qquad<br />
\begin{array}{l}<br />
{i} = 1, \, \ldots \, ,{I}_m \\<br />
{m} = 1, \, \ldots \, ,M<br />
\end{array}<br />
</math><br />
<br />
Notice that the assumption that only time derivatives of internal variables appear above and that terms involving such derivatives are linear does not impose restrictions on the applicability of the model.<br />
<br />
== Data Structure ==<br />
<br />
A circuit is represented in OCS by a struct variable with the fields listed below<br />
<br />
{{Code|OCS structure format |<syntaxhighlight lang="octave" style="font-size:13px"><br />
cir_struct =<br />
{<br />
LCR: struct % the fields of LCR are shown below<br />
NLC: struct % NLC has the same fields as LCR<br />
namesn: matrix % numbers of vars that are assigned a name in and.nms<br />
namess: cell % the names corresponding to the vars above<br />
totextvar: scalar % the total number of external variables<br />
totintvar: scalar % the total number of internal variables<br />
}<br />
<br />
outstruct.LCR =<br />
{<br />
1x2 struct array containing the fields: % array has one element per block<br />
<br />
func % name of the sbn file corresponding to each block<br />
section % string parameter to be passed to the sbn files<br />
nextvar % number of external variables for each element of the block<br />
vnmatrix % numbers of the external variables of each element<br />
nintvar % number of internal variables for each element of the block<br />
osintvar % number of the first internal variable<br />
npar % number of parameters<br />
nparnames% number of parameter names<br />
nrows % number of rows in the block<br />
parnames % list of parameter names<br />
pvmatrix % list of parameter values for each element<br />
<br />
}<br />
</syntaxhighlight>}}<br />
<br />
== File Formats ==<br />
<br />
There are several ways of setting up the data structure for an OCS simulation.<br />
The first approach is to just assign the fields of the data structure via Octave commands,<br />
otherwise one can parse an ascii file written in (a subste of) SPICE netlist language or<br />
in OCS's own netlist specification language called IFF (Interchange File Format)<br />
<br />
=== IFF netlists ===<br />
<br />
The name IFF stands for "Intermediate File Format" or "Interchange File Format" it represents an ASCII file format for describing coupled electrical circuits, devices and systems. The IFF syntx described here is version 0.1b1.<br />
<br />
A circuit description is comprised of a set of files of three different types:<br />
* 1 CIR (Circuit) file: an ASCII text file with filename <circuitname>.cir<br />
* 1 NMS (Names) file: an ASCII text file with filename <circuitname>.nms<br />
* N >= 1 SBN (Subnet) files: a set of M-functions or DLD-functions following the template described below.<br />
<br />
SBN files are not necessarily specific to one circuit and can be grouped in libraries as long as the directory containing the library is added to the path when the IFF parser is run.<br />
<br />
==== CIR file ====<br />
<br />
The CIR file is divided into two sections describing the linear time–independent (LCR = linear circuit) and the non–linear and/or time–dependent (NLC = non–linear circuit) partitions of the circuit respectively. The syntax for the LCR and NLC section is identical. NLC can also contain linear elements, in fact the whole circuit could be described only by the NLC section but this could result in the evaluator unnecessarily recomputing local matrices for linear time–independent elements The content of CIR files is organized as follows:<br />
<br />
{{Code|CIR file format |<syntaxhighlight lang="text" style="font-size:13px"><br />
cir := header nlc separator lcr separator ;<br />
header := '%' version_id '$\nl$' <br />
comment* ;<br />
comment:= '%' text '$\nl$' ;<br />
nlc := block* ;<br />
block := blockcomment? blockheader pv_matrix vnum_matrix ;<br />
block_comment := '%' text '$\nl$' ;<br />
block_header := func section n_extvar n_par '$\nl$' <br />
n_rows n_parnames '$\nl$' <br />
par_name*;<br />
section := string ; <br />
n_extvar := number ; <br />
n_par := number ; <br />
n_rows := number ;<br />
n_parnames := number ;<br />
par_name := string ; <br />
pv_matrix := matrix ;<br />
vnum_matrix := matrix ;<br />
matrix := number+ ; <br />
separator := 'END $\nl$' ; <br />
lcr := block* ;<br />
</syntaxhighlight>}}<br />
<br />
<br />
where <br />
* "version_id" is a string identifying the version on IFF in which the file is encoded<br />
* "\n" is the new-line character string that represents anything that the Octave command "s=fscanf(file,%s)" would parse as a string i.e. any sequence of chars without white-space<br />
* "text" is any sequence of chars without a \n, this differs from string because it can contain white–space number represents anything that the Octave command "s=fscanf(file,%g)" would parse as a number<br />
* "func" is the name of a function to evaluate the elements described in the block<br />
* "n_extvar" Is the number of external variables for the elements of a block<br />
* "n_par" Is the number of parameters for the elements of a block<br />
* "n_rows" Is the number of elements in a block<br />
* n_parnames" Is the number of parameter names for the elements of a block, it corresponds to the number of par name entries. If "n_parnames" is 0 the line with the "par_names" is missing.<br />
* "pv_matrix" Is a list of n_rows x n_par numbers separated by any character the Octave command "s=fscanf(file,%g)" would consider whitespace (including "\n"). Every row (a set of n par contiguous entries) in "pv_matrix" refers to an element of the circuit. The "n_par" numbers in a row represent the values of the parameters to be passed to the function that evaluates that element.<br />
* "vnum_matrix" Is a list of "n_rows" x "n_extvar" numbers separated by any character the Octave command "s=fscanf(file,%g)" would consider white-space (including \n). Every row (a set of "n_extvar" contiguous entries) in "vnum_matrix" refers to an element of the circuit. The "n_extvar" numbers in the row represent the global numbering of the element external variables.<br />
<br />
==== NMS files ====<br />
<br />
NMS files are meant to contain the names of the circuit variables, the format of NMS is<br />
just a list of variable names one on each row preceded by the variable number:<br />
{{Code|CIR file format |<syntaxhighlight lang="text" style="font-size:13px"><br />
nms := version id ’\n’ comment∗ line∗ ; line := var number var name ;<br />
var number := number ;<br />
var name := string ;<br />
</syntaxhighlight>}}<br />
<br />
the variable are ordered as follows:<br />
* first all external variables of all elements in the order given by the global numbering of external variables as explicitly written in the CIR files<br />
* then the internal variables of the elements in the same order as the corresponding elements appear in the CIR file ( internal variables of non-linear elements first, then those of linear elements)<br />
<br />
Notice that the number of internal variables of each element is not included in the IFF files. This is because elements with a number of internal variables that is huge, that depends on the value of some parameter, or even that changes in time (for example distributed elements treated with a FEM with adaptive meshing, a large linear sub- circuit that is reduce via MOR...) and therefore it is more convenient to compute the number of internal variables when initializing the system.<br />
<br />
<br />
==== SBN files ====<br />
<br />
SBN files are Octave functions, implemented as M-scripts or as DLD functions,<br />
with the following signature<br />
<br />
{{Code|Model evaluator file for simple MOSFET models |<syntaxhighlight lang="octave" style="font-size:13px"><br />
function [a, b, c] =...<br />
func (string , pvmatrix(i ,:) , extvar , intvar , t)<br />
</syntaxhighlight>}}<br />
i.e. it should get as inputs:<br />
* the string entry of the "block_header"<br />
* one row of the "pv_matrix" entry of the "block"<br />
* the current values of all internal and external variables <br />
* the current time<br />
and it should produce as outputs three matrices:<br />
* <math>a, b \in \mathbb{R}^{({n_{extvar}} + {n_{intvar}}) <br />
\times ({n_{extvar}} + {n_{intvar})}}</math><br />
* <math>c \in \mathbb{R}^{({n_{extvar}} + {n_{intvar}})}</math><br />
where "n_intvar" is the number of internal variables that can be assembled in the complete system matrices.<br />
<br />
=== SPICE netlists ===<br />
<br />
SPICE .spc netlists are parsed via the function "prs_spice", which currently supports the set of "Element Cards"<br />
shown below with their instantiating syntax.<br />
{{Code|Model evaluator file for simple MOSFET models |<syntaxhighlight lang="text" style="font-size:13px"><br />
- Capacitors:<br />
Cname n+ n- cvalue<br />
<br />
- Diodes:<br />
Cname anode knode modelname <parameters><br />
<br />
- MOS:<br />
Mname gnode dnode snode bnode modelname <parameters><br />
<br />
N.B.: one instance of a MOS element MUST be preceeded<br />
(everywhere in the file) by the declaration of the related<br />
model. For instance:<br />
.MODEL mynmos NMOS( k=1e-4 Vth=0.1 rd=1e6)<br />
M2 Vgate 0 Vdrain 0 mynmos<br />
<br />
- Resistors:<br />
Rname n+ n- rvalue<br />
<br />
- Voltage sources:<br />
Vname n+ n- <dcvalue> <transvalue><br />
<br />
Transvalue specifies a transient voltage source<br />
SIN(VO VA FREQ TD THETA)<br />
where:<br />
* VO (offset)<br />
* VA (amplitude)<br />
* FREQ (frequency)<br />
* TD (delay)<br />
* THETA (damping factor)<br />
<br />
* 0 to TD: V0<br />
* TD to TSTOP: VO +<br />
VA*exp(-(time-TD)*THETA)*sine(twopi*FREQ*(time+TD))<br />
<br />
Currently the damping factor has no effect.<br />
<br />
Pulse<br />
PULSE(V1 V2 TD TR TF PW PER)<br />
<br />
parameters meaning<br />
* V1 (initial value)<br />
* V2 (pulsed value)<br />
* TD (delay time)<br />
* TR (rise time)<br />
* TF (fall time)<br />
* PW (pulse width)<br />
* PER (period)<br />
<br />
Currently rise and fall time are not implemented yet.<br />
<br />
- .MODEL cards Defines a model for semiconductor devices<br />
<br />
.MODEL MNAME TYPE(PNAME1=PVAL1 PNAME2=PVAL2 ... )<br />
<br />
TYPE can be:<br />
* NMOS N-channel MOSFET model<br />
* PMOS P-channel MOSFET model<br />
* D diode model<br />
<br />
The parameter "LEVEL" is currently assigned to the field<br />
"section" in the call of the element functions by the solver.<br />
Currently supported values for the parameter LEVEL for NMOS<br />
and PMOS are:<br />
* simple<br />
* lincap<br />
(see documentation of function Mdiode).<br />
<br />
Currently supported values for the parameter LEVEL for D are:<br />
* simple<br />
(see documentation of functions Mnmosfet and Mpmosfet).<br />
<br />
</syntaxhighlight>}}<br />
<br />
== Tutorials ==<br />
<br />
=== A CMOS AND GATE ===<br />
<br />
[[File:AND_BW.png|thumb| Schematic for a CMOS AND gate]]<br />
<br />
Here we show how to set up the simulation of the CMOS AND gate in the figure.<br />
The circuit has <br />
* 9 Elements<br />
** 6 MOSFETs (3 n-type + 3 p-type)<br />
** 3 Voltage sources<br />
<br />
For the n-type MOSFETs we use a very simple algebraic model defined by the following code<br />
<br />
{{Code|Model evaluator file for simple MOSFET models |<syntaxhighlight lang="octave" style="font-size:13px"><br />
function [a,b,c] = Mnmosfet (string, parameters, parameternames, extvar, intvar, t) <br />
<br />
switch string<br />
<br />
case 'simple',<br />
<br />
rd = 1e6;<br />
<br />
for ii=1:length(parameternames)<br />
eval([parameternames{ii} "=",...<br />
num2str(parameters(ii)) " ;"]) <br />
endfor<br />
<br />
vg = extvar(1);<br />
vs = extvar(2);<br />
vd = extvar(3);<br />
vb = extvar(4);<br />
<br />
vgs = vg-vs;<br />
vds = vd-vs;<br />
<br />
if (vgs < Vth)<br />
<br />
<br />
gm = 0;<br />
gd = 1/rd;<br />
id = vds*gd;<br />
<br />
elseif ((vgs-Vth)>=(vds))&(vds>=0)<br />
<br />
id = k*((vgs-Vth)*vds-(vds^2)/2)+vds/rd;<br />
gm = k*vds;<br />
gd = k*(vgs-Vth-vds)+1/rd;<br />
<br />
elseif ((vgs-Vth)>=(vds))&(vds<0)<br />
<br />
gm = 0;<br />
gd = 1/rd;<br />
id = vds*gd;<br />
<br />
else # (i.e. if 0 <= vgs-vth <= vds)<br />
<br />
id = k*(vgs-Vth)^2/2+vds/rd;<br />
gm = k*(vgs-Vth);<br />
gd = 1/rd;<br />
<br />
endif<br />
<br />
a = zeros(4);<br />
<br />
b = [ 0 0 0 0;<br />
-gm (gm+gd) -gd 0; <br />
gm -(gm+gd) gd 0;<br />
0 0 0 0];<br />
<br />
c = [0 -id id 0]';<br />
break;<br />
<br />
otherwise<br />
<br />
error(["Mnmosfet: unknown option " string]);<br />
<br />
endswitch<br />
<br />
endfunction<br />
</syntaxhighlight><br />
}}<br />
<br />
The model for the p-type devices is entirely analogous.<br />
<br />
Below we show three methods for constructing the circuit data structure<br />
<br />
* [[Ocs package#Build the AND GATE structure directly| using an Octave script ]]<br />
* [[Ocs package#Build the AND gate circuit structure parsing a .spc file| parsing a SPICE netlist]]<br />
* [[Ocs package#Build the AND gate circuit structure parsing an IFF netlist| parsing an IFF netlist]]<br />
<br />
Once the circuit data structure is loaded the simulation can be started by the following commands<br />
<br />
{{Code|Run the AND gate simulation |<syntaxhighlight lang="octave" style="font-size:13px"><br />
x = [.5 .5 .33 .66 .5 1 0 0 1 ]';<br />
t = linspace (0, .5, 100);<br />
pltvars = {"Va", "Vb", "Va_and_b"};<br />
dmp = .2;<br />
tol = 1e-15;<br />
maxit = 100;<br />
out = tst_backward_euler (outstruct, x, t, tol, maxit, pltvars);<br />
</syntaxhighlight><br />
}}<br />
<br />
[[File:AND_result.png|thumb| Result of the CMOS AND gate switching simulation]]<br />
<br />
Click on the figure to the right to see the simulation results<br />
<br />
<br />
<br />
==== Build the AND GATE structure directly ====<br />
<br />
{{Code|Build the AND GATE structure via an Octave script |<syntaxhighlight lang="octave" style="font-size:13px"><br />
## NLC<br />
<br />
# n-type<br />
outstruct.NLC(1).func = "Mnmosfet";<br />
outstruct.NLC(1).section = "simple";<br />
outstruct.NLC(1).nextvar = 4;<br />
outstruct.NLC(1).npar = 3;<br />
outstruct.NLC(1).nparnames = 3;<br />
outstruct.NLC(1).parnames = { "k", "Vth", "rd"};<br />
<br />
outstruct.NLC(1).pvmatrix = [1.0000e-04 1.0000e-01 1.0000e+07<br />
1.0000e-04 1.0000e-01 1.0000e+07<br />
1.0000e-04 1.0000e-01 1.0000e+07];<br />
<br />
outstruct.NLC(1).vnmatrix = [1 3 4 0<br />
2 0 3 0<br />
4 0 5 0];<br />
<br />
outstruct.NLC(1).nintvar = [0 0 0];<br />
outstruct.NLC(1).osintvar = [0 0 0];<br />
<br />
<br />
# p-type<br />
outstruct.NLC(2).func = "Mpmosfet";<br />
outstruct.NLC(2).section = "simple";<br />
outstruct.NLC(2).nextvar = 4;<br />
outstruct.NLC(2).npar = 3;<br />
outstruct.NLC(2).nparnames = 3;<br />
outstruct.NLC(2).parnames = { "k", "Vth", "rd"};<br />
outstruct.NLC(2).pvmatrix = [-1.0000e-04 -1.0000e-01 1.0000e+07<br />
-1.0000e-04 -1.0000e-01 1.0000e+07<br />
-1.0000e-04 -1.0000e-01 1.0000e+07];<br />
outstruct.NLC(2).vnmatrix = [ 1 6 4 6<br />
2 6 4 6<br />
4 6 5 6];<br />
<br />
outstruct.NLC(2).nintvar = [0 0 0];<br />
outstruct.NLC(2).osintvar = [0 0 0];<br />
<br />
# Va and Vb<br />
<br />
outstruct.NLC(3).func = "Mvoltagesources";<br />
outstruct.NLC(3).section = "sinwave";<br />
outstruct.NLC(3).nextvar = 2;<br />
outstruct.NLC(3).npar = 4;<br />
outstruct.NLC(3).nparnames = 4;<br />
outstruct.NLC(3).parnames = {"Ampl", "f", "delay", "shift"};<br />
outstruct.NLC(3).pvmatrix = [0.50000 1.00000 0.00000 0.50000<br />
0.50000 2.00000 0.25000 0.50000];<br />
outstruct.NLC(3).vnmatrix = [ 1 0<br />
2 0];<br />
outstruct.NLC(3).nintvar = [1 1];<br />
outstruct.NLC(3).osintvar = [0 0];<br />
<br />
## LCR<br />
<br />
# Vdd<br />
outstruct.LCR(1).func = "Mvoltagesources";<br />
outstruct.LCR(1).section = "DC";<br />
outstruct.LCR(1).nextvar = 2;<br />
outstruct.LCR(1).npar = 1;<br />
outstruct.LCR(1).nparnames = 1;<br />
outstruct.LCR(1).parnames = {"V"};<br />
outstruct.LCR(1).pvmatrix = 1;<br />
outstruct.LCR(1).vnmatrix = [6 0];<br />
outstruct.LCR(1).nintvar = 1;<br />
outstruct.LCR(1).osintvar = 2;<br />
<br />
## <br />
<br />
outstruct.namesn = [1 2 5 6 7 8 9];<br />
outstruct.namess = {"Va", "Vb", "Va_and_b", "Vdd", "I1", "I2", "I3"};<br />
outstruct.totextvar = 6;<br />
outstruct.totintvar = 3;<br />
</syntaxhighlight><br />
}}<br />
<br />
<br />
==== Build the AND gate circuit structure parsing an IFF netlist ====<br />
<br />
To parse an IFF format netlist of the CMOS AND gate we can use the following command<br />
<br />
{{Code|Load the AND circuit structure parsing an IFF netlist |<syntaxhighlight lang="octave" style="font-size:13px"><br />
outstruct = prs_iff ("and");<br />
</syntaxhighlight><br />
}}<br />
<br />
The IFF netlist consists of the .cir file named "and.cir" shown below<br />
<br />
{{Code|IFF netlist for the AND gate (.cir file)|<syntaxhighlight lang="text" style="font-size:13px"><br />
% 0.1b1<br />
% A Simple CMOS AND GATE<br />
%<br />
% N-Mosfets<br />
% There are 3 N-Mosfets<br />
Mnmosfet simple 4 3<br />
3 3<br />
k Vth rd<br />
1e-4 0.1 1e7<br />
1e-4 0.1 1e7<br />
1e-4 0.1 1e7<br />
1 3 4 0 <br />
2 0 3 0 <br />
4 0 5 0 <br />
%<br />
% P-Mosfets<br />
Mpmosfet simple 4 3<br />
3 3<br />
k Vth rd<br />
-1e-4 -0.1 1e7<br />
-1e-4 -0.1 1e7<br />
-1e-4 -0.1 1e7<br />
1 6 4 6 <br />
2 6 4 6 <br />
4 6 5 6<br />
%<br />
% Input voltage sources<br />
Mvoltagesources sinwave 2 4<br />
2 4<br />
Ampl f delay shift<br />
0.5 1 0.0 0.5<br />
0.5 2 0.25 0.5<br />
1 0 <br />
2 0 <br />
END<br />
%<br />
% Power supply<br />
Mvoltagesources DC 2 1<br />
1 1<br />
V<br />
1<br />
6 0 <br />
END<br />
</syntaxhighlight><br />
}}<br />
<br />
and of the .nms file named "and.nms shown below<br />
<br />
{{Code|IFF netlist for the AND gate (.nms file)|<syntaxhighlight lang="text" style="font-size:13px"><br />
% 0.1b1<br />
1 Va<br />
2 Vb<br />
5 Va_and_b<br />
6 Vdd<br />
7 I1<br />
8 I2 <br />
9 I3<br />
</syntaxhighlight><br />
}}<br />
<br />
==== Build the AND gate circuit structure parsing a .spc file ====<br />
<br />
{{Code|Load the AND circuit structure parsing a .spc file |<syntaxhighlight lang="octave" style="font-size:13px"><br />
outstruct = prs_spice ("and");<br />
</syntaxhighlight><br />
}}<br />
<br />
<br />
{{Code| The .spc file for the CMOS AND gate|<syntaxhighlight lang="text" style="font-size:13px"><br />
* AND (simple Algebraic MOS-FET model)<br />
<br />
.MODEL mynmos NMOS(LEVEL=simple k=2.94e-05 Vth=0.08 rd=.957e7)<br />
.MODEL mypmos PMOS( k=-2.94e-05 Vth=-0.08 rd=.957e7)<br />
<br />
M1 Va 3 4 0 mynmos <br />
M2 Vb 0 3 0 mynmos <br />
* nside of the inverter<br />
M3 4 0 Va_and_b 0 mynmos <br />
<br />
M4 Va Vdd 4 Vdd mypmos<br />
M5 Vb Vdd 4 Vdd mypmos<br />
<br />
* pside of the inverter<br />
M6 4 Vdd Va_and_b Vdd mypmos <br />
<br />
V1 Va 0 SIN(0.5 0.5 1 0 0)<br />
V2 Vb 0 SIN(0.5 0.5 2 0.25 0)<br />
V3 Vdd 0 1<br />
<br />
.END<br />
<br />
</syntaxhighlight><br />
}}<br />
<br />
=== A circuit with a linear VCVS ===<br />
<br />
To parse an IFF format netlist of the VCVS circuit we can use the following command<br />
<br />
{{Code|Load the VCVS circuit structure parsing an IFF netlist |<syntaxhighlight lang="octave" style="font-size:13px"><br />
outstruct = prs_iff ("vcvs");<br />
</syntaxhighlight><br />
}}<br />
<br />
The IFF netlist consists of the .cir file named "vcvs.cir" shown below<br />
<br />
{{Code|IFF netlist for the VCVS circuit (.cir file)|<syntaxhighlight lang="text" style="font-size:13px"><br />
%0.1b1<br />
% A Simple linear VCVS example<br />
% Input voltage sources<br />
Mvoltagesources sinwave 2 4<br />
1 4<br />
Ampl f delay shift<br />
1 1 0.0 0.0<br />
1 0 <br />
END<br />
% VCVS<br />
Mvcvs LIN 4 1<br />
1 1<br />
Gain<br />
5.0<br />
2 0 1 0<br />
% Resistor<br />
Mresistors LIN 2 1<br />
1 1<br />
R<br />
1<br />
1 2<br />
END<br />
</syntaxhighlight><br />
}}<br />
<br />
and of the .nms file named "and.nms shown below<br />
<br />
{{Code|IFF netlist for the VCVS circuit (.nms file)|<syntaxhighlight lang="text" style="font-size:13px"><br />
% 0.1b1<br />
1 V_controller<br />
2 V_controlled<br />
</syntaxhighlight><br />
}}<br />
<br />
The implementation for the VCVS with linear gain is shown below<br />
<br />
{{Code|Model evaluator file for simple VCVS model |<syntaxhighlight lang="octave" style="font-size:13px"><br />
function [a,b,c] = Mvcvs (string, parameters, parameternames, extvar,<br />
intvar, t)<br />
<br />
if isempty(intvar)<br />
intvar = 0;<br />
endif<br />
<br />
switch string <br />
##LCR part<br />
case "LIN"<br />
for ii=1:length(parameternames)<br />
eval([parameternames{ii} "=" num2str(parameters(ii)) ";"]) <br />
endfor<br />
<br />
j = intvar (1);<br />
Vin = extvar (3) - extvar (4);<br />
V = Vin * Gain;<br />
<br />
a = zeros (5); <br />
b = [0 0 0 0 1;<br />
0 0 0 0 -1;<br />
0 0 0 0 0;<br />
0 0 0 0 0;<br />
1 -1 -Gain Gain 0];<br />
<br />
c = [0 0 0 0 0];<br />
break<br />
<br />
otherwise<br />
error (["unknown section:" string])<br />
endswitch<br />
<br />
endfunction<br />
</syntaxhighlight><br />
}}<br />
<br />
[[File:VCVS_result.png|thumb| Result of the VCVS simulation]]<br />
<br />
To run a simulation with this circuit use the following commands:<br />
<br />
{{Code|Run a simple transient simulation with the VCVS circuit |<syntaxhighlight lang="octave" style="font-size:13px"><br />
>> x = [0 0 0 0]';<br />
>> t = linspace(0,1,50);<br />
>> [out, niter] = tst_backward_euler (outstruct, x, t, 1e-6, 100, pltvars, [0 1]);<br />
</syntaxhighlight><br />
}}<br />
<br />
=== Creating a model for a memristor device ===<br />
<br />
To demonstrate how to write a model evaluator file (SBN file), we<br />
will discuss the simplest memristor model shown in this paper by [[User:KaKiLa| KaKiLa]] et al. (Carbajal, J. P. et al.(2015). [http://www.mitpressjournals.org/doi/abs/10.1162/NECO_a_00694?journalCode=neco#.VgFNn9tSukp Memristor models for machine learning]. Neural Computation, 27(3). Learning; Materials Science. doi:10.1162/NECO_a_00694</ref><br />
<br />
The device model is presented in the original paper as<br />
<br />
<math><br />
\left\{<br />
\begin{array}{l}<br />
\dot{x} = \mu I(t)\\<br />
H(x) = \left\{<br />
\begin{array}{l}<br />
R \qquad x \le 0\\<br />
R - (R - r) x \qquad 0 < x < 1\\<br />
r \qquad x > 1<br />
\end{array} <br />
\right.\\<br />
V(t) = H(x) I(t)<br />
\end{array} <br />
\right.<br />
</math><br />
<br />
The first thing to do is to change the model from impedance to admittance form<br />
and write the constitutive relation for the internal variable in an "implicit form"<br />
<br />
<math><br />
\left\{<br />
\begin{array}{l}<br />
\dfrac{1}{\mu} \dot{x} + Q(V(t), x(t)) = \dfrac{1}{\mu} \dot{x} - I(t) = 0\\<br />
H(x) = \left\{<br />
\begin{array}{l}<br />
R \qquad x \le 0\\<br />
R - (R - r) x \qquad 0 < x < 1\\<br />
r \qquad x > 1<br />
\end{array} <br />
\right.\\<br />
I(t) = \dfrac{V(t)}{H(x)}<br />
\end{array} <br />
\right.<br />
</math><br />
<br />
It is then useful to compute the derivatives for the current and for the constitutive relation<br />
<br />
<math><br />
\dfrac{\partial I}{\partial x} = -\dfrac{H'(x)}{H(x)^2} <br />
</math><br />
<br />
<math><br />
\dfrac{\partial I}{\partial V} = \dfrac{1}{H} <br />
</math><br />
<br />
<math><br />
H'(x) = \left\{<br />
\begin{array}{l}<br />
0 \qquad x \le 0\\<br />
- (R - r) \qquad 0 < x < 1\\<br />
0 \qquad x > 1<br />
\end{array} <br />
\right.<br />
</math><br />
<br />
Next we define external variables (pin voltages) for the device and coupling variables (pin currents)<br />
<br />
N.B. the convention in existing device models is that pin currents are <br />
assumed to be entering the device<br />
<br />
<math><br />
\begin{array}{l}<br />
i^{+} = I(t)\\<br />
i^{-} = -I(t)\\<br />
V(t) = v^{+} - v^{-}<br />
\end{array}<br />
</math><br />
<br />
<br />
Now define the local state vector<br />
<br />
<math><br />
z = <br />
\left[<br />
\begin{array}{l}<br />
v^{+}\\<br />
v^{-}\\<br />
x<br />
\end{array}<br />
\right]<br />
</math><br />
<br />
and the local equations<br />
<br />
<math><br />
a \dot{z} + c(z) = 0<br />
</math><br />
<br />
and finally define the local matrices for the memristor element<br />
<br />
<math><br />
a = \left[\begin{array}{c c c} 0 & 0 & 0\\ 0 & 0 & 0\\ 0 & 0 & \dfrac{1}{\mu}\end{array}\right]<br />
</math><br />
<br />
<br />
<math><br />
c(z) = \left[\begin{array}{c}\dfrac{V}{H}\\[2mm] -\dfrac{V}{H}\end{array}\right]<br />
</math><br />
<br />
<br />
<math><br />
b(z) = \dfrac{\partial c}{\partial z} =<br />
\left[<br />
\begin{array}{c c c}<br />
\dfrac{\partial I}{\partial V} & -\dfrac{\partial I}{\partial V} & \dfrac{\partial I}{\partial x}\\[2mm]<br />
-\dfrac{\partial I}{\partial V} & +\dfrac{\partial I}{\partial V} & -\dfrac{\partial I}{\partial x}\\[2mm]<br />
-\dfrac{\partial I}{\partial V} & +\dfrac{\partial I}{\partial V} & -\dfrac{\partial I}{\partial x}\\[2mm]<br />
\end{array}<br />
\right]<br />
</math><br />
<br />
The resulting model implementation is the following<br />
<br />
{{Code| memristor model implementation|<syntaxhighlight lang="octave"><br />
function [a,b,c] = Mmemristors (string, parameters, parameternames,<br />
extvar, intvar, t)<br />
<br />
if isempty(intvar)<br />
intvar = 0;<br />
endif<br />
<br />
switch string <br />
case "STRUKOV"<br />
## NLC part<br />
for ii=1:length(parameternames)<br />
eval([parameternames{ii} "=" num2str(parameters(ii)) ";"]) <br />
endfor<br />
<br />
v1 = extvar(1);<br />
v2 = extvar(2);<br />
x = intvar(1);<br />
<br />
if (x <= 0)<br />
H = RH;<br />
Hp = 0; <br />
elseif (x > 0 && x < 1)<br />
H = RH - (RH - RL) * x;<br />
Hp = - (RH - RL);<br />
else<br />
H = RL;<br />
Hp = 0;<br />
endif<br />
<br />
I = (v1-v2) / H;<br />
i1 = I;<br />
i2 = -I;<br />
<br />
dIdx = - Hp / H^2;<br />
dIdV = 1 / H;<br />
<br />
a = zeros (3);<br />
a(3, 3) = 1/ MU;<br />
<br />
b = [dIdV -dIdV dIdx;<br />
-dIdV dIdV -dIdx;<br />
-dIdV dIdV -dIdx];<br />
<br />
c = [i1 i2 i2]';<br />
<br />
break;<br />
<br />
otherwise<br />
error (["unknown section:" string])<br />
endswitch<br />
<br />
endfunction<br />
</syntaxhighlight><br />
}}<br />
<br />
<br />
<br />
As an example let's run a simulation by applying a sinusoidal signal with varying <br />
frequency<br />
<br />
{{Code| memristor model implementation|<syntaxhighlight lang="octave"><br />
t = linspace (0, 1, 100);<br />
y = [(sin (2 * pi * t * 1.5)), (sin (2 * pi * t * 4))(2:end)];<br />
t = [t, (linspace (1, 2, 100))(2:end)];<br />
pwl = [t; y](:).';<br />
<br />
c1.LCR = [];<br />
c1.totextvar = 1;<br />
<br />
c1.NLC(1).("func") = "Mvoltagesources";<br />
c1.NLC(1).("section") = "pwl";<br />
c1.NLC(1).("nextvar") = 2;<br />
c1.NLC(1).("npar") = 398;<br />
c1.NLC(1).("nrows") = 1;<br />
c1.NLC(1).("nparnames") = 0;<br />
c1.NLC(1).("parnames") = {};<br />
c1.NLC(1).("pvmatrix") = pwl;<br />
c1.NLC(1).("vnmatrix") = [1 0];<br />
c1.NLC(1).("nintvar") = 1;<br />
c1.NLC(1).("osintvar") = 0;<br />
<br />
c1.NLC(2).("func") = "Mmemristors";<br />
c1.NLC(2).("section") = "STRUKOV";<br />
c1.NLC(2).("nextvar") = 2;<br />
c1.NLC(2).("npar") = 3;<br />
<br />
c1.totintvar = 2;<br />
c1.namesn = [1 2 3];<br />
<br />
c1.NLC(2).("nrows") = 1;<br />
c1.NLC(2).("nparnames") = 3;<br />
c1.NLC(2).("parnames") = {"MU", "RH", "RL"};<br />
c1.NLC(2).("pvmatrix") = [1.8e3 1e3 1];<br />
c1.NLC(2).("vnmatrix") = [1 0];<br />
<br />
c1.NLC(2).("nintvar") = 1;<br />
c1.NLC(2).("osintvar") = 1;<br />
<br />
c1.namess = {"voltage", "current", "x"};<br />
start = [0 0 0.1];<br />
<br />
%% c = prs_iff ("memristor_example");<br />
out = tst_backward_euler (c1, start.', t, 1e-2, 300, {'voltage', 'current'});<br />
<br />
plot (out(1, 1:100), out (2, 1:100), 'r',<br />
out(1, 101:end), out(2, 101:end), 'k')<br />
<br />
legend ("frequency 1 Hz", "frequency 4 Hz")<br />
<br />
</syntaxhighlight><br />
}}<br />
<br />
[[File:memristor.png|thumb| Memristor simulation result]]<br />
<br />
The results are shown in the figure to the right.<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Mechanics_package&diff=11763
Mechanics package
2019-03-12T23:30:35Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>The Mechanics package is a multipackage providing tools for calculations related to classical mechanics.<br />
<br />
Sadly this project could take off and is '''now defunct'''. You can still find the old files in the Octave-Forge server.<br />
<br />
== See also ==<br />
* {{Forge|mechanics}} at [[Octave Forge]].<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Java_package&diff=11762
Java package
2019-03-12T23:30:20Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>Java offers a rich, object oriented, and platform independent environment for many applications. The core Java classes can be easily extended by many freely available libraries. GNU Octave has a java interface that allows access to Java classes from inside Octave. Thus it is possible to use existing class files or complete Java libraries directly from Octave.<br />
<br />
= Octave 3.8 or later =<br />
<br />
{{Warning|Do not install the java package in Octave version 3.8.0 or later.}}<br />
<br />
GNU Octave 3.8.0 incorporated the Octave Forge java package so the package is no longer necessary. If the package is installed, it will shadow the core functions making the java interface unreliable.<br />
<br />
However, even for these versions, Octave needs to have been built with java support. Check it like so:<br />
<br />
>> (str2num(strtok(version(), '.')) > 4 && __octave_config_info__("JAVA")) || octave_config_info ("features").JAVA<br />
ans = 1<br />
<br />
If your installation of Octave does not have java support, it needs to be rebuilt from source. See the pages specific to your Operating System for further details.<br />
<br />
== Documentation ==<br />
<br />
See the [http://www.gnu.org/software/octave/doc/interpreter/Java-Interface.html Java Interface] section of the Octave manual.<br />
<br />
= Legacy versions -- Octave 3.6 and older =<br />
<br />
Older versions of Octave did not have a native java interface. Instead, the Octave Forge java package was required. This needed to be installed separately via {{Codeline|pkg}}. To install, download the [http://octave.sourceforge.net/java/index.html java package] and install it with {{Codeline|pkg install path-to-java.tar.gz}}<br />
<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=IO_package&diff=11761
IO package
2019-03-12T23:30:00Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>The {{Forge|io|IO package}} is part of the Octave Forge project and provides input/output from/in external formats.<br />
<br />
<div class="tocinline">__TOC__</div><br />
<br />
=== About read/write support ===<br />
<br />
Most people need this package to read and write Excel files. But the io package can read/write Open/Libre Office, Gnumeric and some less important files too.<br />
<br />
<pre><nowiki><br />
File extension COM POI POI/OOXML JXL OXS UNO OTK JOD OCT<br />
--------------------------------------------------------------<br />
.xls (Excel95) R R R<br />
.xls (Excel97-2003) + + + + + +<br />
.xlsx (Excel2007+) ~ + (+) + +<br />
.xlsb, .xlsm ~ ? R R?<br />
.wk1 + R<br />
.wks + R<br />
.dbf + +<br />
.ods ~ + + + +<br />
.sxc + +<br />
.fods +<br />
.uos +<br />
.dif + +<br />
.csv + R<br />
.gnumeric +<br />
--------------------------------------------------------------<br />
<br />
R : only read; + : full read/write; ~ : dependent on Excel version<br />
</nowiki></pre><br />
<br />
<br />
==== xlswrite / odswrite versus xlsopen / odsopen ..... xlsclose / odsclose ====<br />
<br />
Matlab users are used to xlsread and xlswrite, functions that can only read data from, or write data to, one sheet in a spreadsheet file at a time. For each operation, xlsread and xlswrite first have to read the entire spreadsheet file, for write operations xlswrite also has to finally write it out completely to disk.<br />
There are faster ways, but then you'll have to dive into ActiveX/COM/VisualBasic programming.<br />
<br />
If you want to move multiple pieces of data to/from a spreadsheet file, the io package offers a much more versatile scheme:<br />
* First open the spreadsheet file using xlsopen (for Excel or gnumeric files) or odsopen (.ods or .gnumeric). <br />
'''NOTE''': the output of these functions is a file pointer handle that you should treat carefully!<br />
* (for reading data) Read the data using raw_data = xls2oct (<fileptr> [,sheet#] [,cellrange] [,options])<br />
* Next, optionally split the data in numerical, text and raw data and optionally get the limits of where these came from:<br />
[num, txt, raw, lims] = parsecell (data, <fileptr.lims>)<br />
* (for writing data) Write the data using <fileptr> = oct2xls (data, <fileptr> [,sheet#] [,cellrange] [,options])<br />
* When you're finished, DO NOT FORGET to close the file pointer handle:<br />
<fileptr> = xlsclose (<fileptr>)</pre><br />
<br />
Mixing read and write operations in any order is permitted (the only exception: not with the JXL -JExcelAPI- interface).<br />
The same goes for odsopen-ods2oct-oct2ods-odsclose sequences.<br />
<br />
Obviously this is much more flexible (and FASTER) than xlsread and xlswrite. In fact, Octave's io package xlsread is a mere wrapper for an xlsopen-xls2oct-parsecell-xlsclose sequence. Similarly for xlswrite, odsread, and odswrite.<br />
<br />
==== .xls ~= .xlsx ====<br />
<br />
'''This is the most important information you have to keep in mind when you have to work with "Excel" files.''' <br />
* .xls - is an outdated default binary file format from <= Office 2003 - '''try to avoid this format!'''<br />
* .xlsx - is the new default file format since Office 2007. [https://en.wikipedia.org/wiki/OOXML It consists of xml files stored in a .zip container.] - '''always save in or convert to this format!'''<br />
* The ''(new)'' OCT interface can read ''(since version 1.2.5)'' and write ''(since version 2.2.0)'' .xlsx files dependency-free! No need of MS Windows+Office nor Java.<br />
* Windows is notorious for hiding "known" file extensions. However in Windows Explorer it is easy to change this and have Windows show all file extensions.<br />
<br />
<br />
==== different interfaces ====<br />
<br />
The io package comes with different interfaces to read/write different file formats.<br />
# COM<br />
## This ''(interface)'' is only available on MS Windows '''and''' with an MS Office installation.<br />
# [POI, POI/OOXML, JXL, OXS, UNO, OTK, JOD]<br />
## These are java-based interfaces. They are generally slower than Octave's native OCT interface; OTOH they offer more flexibility. Generally the OCT interface offers sufficient flexibility and speed. <br />
# OCT<br />
## This is the new impressive and fast ''(mostly written in Octave itself! + two C files to bypass bottlenecks)'' interface which presently supports .xlsx, .ods and .gnumeric files.<br />
(Note that .ods is a complicated file format with many gotchas that doesn't lend itself for fast file I/O. So unfortunately the fastest .ods interface is the Java-based jOpenDocument (JOD) (luckily it is GPL). However if speed is not an issue or if you hate Java, the OCT interface still performs fast enough.)<br />
<br />
So, if you want to read/write '''.xlsx''' files, you'll only need the io-package >=2.2.0. <br />
<br />
But if you have to read/write '''.xls''' files, you'll need either<br />
* MS Windows with MS Office backings - or<br />
* Octave built with --enable-java, + a Java JRE or -JDK, and one or more of the Java interfaces (i.e., the class libs)!<br />
<br />
If you want to read/write .gnumeric files, the OCT interface is even the only option.<br />
<br />
For some rarely used file formats you'll need LibreOffice + Octave built with Java enabled + a Java JRE or -JDK. But OK, once there you can enjoy formats then like Unified Office Format, Data Interchange Format, SYLK, OpenDocument Flat XML, the old OpenOffice.org .sxc format and some others you may have heard of ;-)<br />
<br />
<br />
==== force an interface ====<br />
<br />
If you don't want that the io-autodetect take control, you can easily force the usage of an interface. Examples:<br />
<br />
Force native OCT interface - only for .xlsx, .ods, .gnumeric<br />
<pre>OCT = xlsread ('file.xlsx', 1, [], 'OCT');</pre><br />
<br />
Force COM interface - may only work with .xls, .xlsx on Windows OS and available office installation.<br />
<pre>COM = xlsread ('file.xlsx', 1, [], 'COM');</pre><br />
<br />
Force POI interface - may only work if you've did javaaddpath for the Apache POI .jar files - only .xls<br />
<pre>POI = xlsread ('file.xls', 1, [], 'POI');</pre><br />
<br />
And so on ...<br />
<br />
<br />
==== 32 vs. 64-bit issues ====<br />
<br />
Generally, if you use a Java-based interface for spreadsheet I/O, it doesn't matter much whether you use Octave 32-bit or Octave 64-bit.<br />
However, the UNO interface (for LibreOffice & OpenOffice.org) is more pertinent: 64-bit Octave can only use a 64-bit LibreOffice with UNO, same for 32 bit.<br />
<br />
<br />
==== Java example ====<br />
<br />
# Again: You only need Java if you have to read/write .xls files! You don't need this for .xlsx files!<br />
# Make sure you've setup everything with java correctly<br />
# get e.g. apache poi jar library files and add them with javaaddpath<br />
<pre><nowiki><br />
octave:1> javaaddpath('~/poi_library/poi-3.8-20120326.jar');<br />
octave:2> javaaddpath('~/poi_library/poi-ooxml-3.8-20120326.jar');<br />
octave:3> javaaddpath('~/poi_library/poi-ooxml-schemas-3.8-20120326.jar');<br />
octave:4> javaaddpath('~/poi_library/xmlbeans-2.3.0.jar');<br />
octave:5> javaaddpath('~/poi_library/dom4j-1.6.1.jar');<br />
octave:6> <br />
octave:6> pkg load io<br />
octave:7> chk_spreadsheet_support <br />
ans = 6<br />
octave:8> javaclasspath <br />
STATIC JAVA PATH<br />
<br />
- empty -<br />
<br />
DYNAMIC JAVA PATH<br />
<br />
/home/markus/poi_library/poi-3.8-20120326.jar<br />
/home/markus/poi_library/poi-ooxml-3.8-20120326.jar<br />
/home/markus/poi_library/poi-ooxml-schemas-3.8-20120326.jar<br />
/home/markus/poi_library/xmlbeans-2.3.0.jar<br />
/home/markus/poi_library/dom4j-1.6.1.jar<br />
<br />
</nowiki></pre><br />
<br />
An easier way is to collect all required Java class libs fo spreadsheet I/O (the .jar files) in one subdir and have chk_spreadsheet_support .m sort it all out:<br />
<pre><nowiki><br />
octave:8> chk_spreadsheet_support ('/full/path/to/subdir/with/.jar/files')<br />
</nowiki></pre><br />
<br />
For UNO (LibreOffice-behind-the-scenes) the call is a bit different:<br />
<pre><nowiki><br />
octave:8> chk_spreadsheet_support ('', 0, '/full/path/to/LibreOffice/installation')<br />
</nowiki></pre><br />
<br />
(On Windows, the io package tries to automatically find all required Java class libs and LibreOffice. To help it, put the Java class libs in you user profile (home directory) in a subdir "java", e.g., C:\Users\Eddy\java. chk_spreadsheet_support searches that location automagically.<br />
On Linux this automatic searching has been disabled as the io package took ages (well, minutes) to load...)<br />
<br />
<br />
Anyway, the chk_spreadsheet_support output should be now > 0.<br />
<br />
<pre><nowiki><br />
0 No spreadsheet I/O support found<br />
---------- XLS (Excel) interfaces: ----------<br />
1 = COM (ActiveX / Excel)<br />
2 = POI (Java / Apache POI)<br />
4 = POI+OOXML (Java / Apache POI)<br />
8 = JXL (Java / JExcelAPI)<br />
16 = OXS (Java / OpenXLS)<br />
--- ODS (OpenOffice.org Calc) interfaces ----<br />
32 = OTK (Java/ ODF Toolkit)<br />
64 = JOD (Java / jOpenDocument)<br />
----------------- XLS & ODS: ----------------<br />
128 = UNO (Java / UNO bridge - OpenOffice.org)<br />
</nowiki></pre><br />
<br />
And reading/writing .xls files should work.<br />
<br />
POI is located differently on every system. To easily find where are the files and their names try to search for: libapache-poi-java.list.<br />
in terminal: <br />
<pre><nowiki><br />
find / -name "libapache-poi-java*" 2>/dev/null<br />
</nowiki></pre><br />
in octave (poi path in ubuntu):<br />
<pre><nowiki><br />
fid = fopen ("/var/lib/dpkg/info/libapache-poi-java.list");<br />
line = fgetl (fid);<br />
while (line != -1)<br />
javaaddpath(line);<br />
line = fgetl (fid);<br />
endwhile<br />
fclose (fid);<br />
pkg load io;<br />
disp(chk_spreadsheet_support); % should be 2<br />
</nowiki></pre><br />
<br />
== Detailed Information (TL) ==<br />
<br />
The following might be more interesting if you're interested in how things work inside the io package.<br />
<br />
=== ODS support ===<br />
(ODS = Open Document Format spreadsheet data format, used by e.g., LibreOffice and OpenOffice.org)<br />
<br />
==== Files content ====<br />
* '''odsread.m''' &mdash; no-hassle read script for reading from an ODS file and parsing the numeric and text data into separate arrays.<br />
* '''odswrite.m''' &mdash; no-hassle write script for writing to an ODS file.<br />
* '''odsopen.m''' &mdash; get a file pointer to an ODS spreadsheet file.<br />
* '''ods2oct.m''' &mdash; read raw data from an ODS spreadsheet file using the file pointer handed by odsopen.<br />
* '''oct2ods.m''' &mdash; write data to an ODS spreadsheet file using the file pointer handed by odsopen.<br />
* '''odsclose.m''' &mdash; close file handle made by odsopen and -if data have been transfered to a spreadsheet- save data.<br />
* '''odsfinfo.m''' &mdash; explore sheet names and optionally estimated data size of ods files with unknown content.<br />
* '''calccelladdress.m''' &mdash; utility function needed for jOpenDocument class.<br />
* '''parsecell.m''' &mdash; (contained in Excel xlsread scripts, but works also for ods support) parse raw data (cell array) into separate numeric array and text (cell) array.)<br />
* '''chk_spreadsheet_support.m''' &mdash; internal function for (1) checking, (2) setting up, (3) debugging spreadsheet support. While not specifically meant for direct invocation from the Octave prompt (it is more useful during initialization of Octave itself) it can be very helpful when hunting down issues with spreadsheet support in Octave.<br />
<br />
The following are support files called by the scripts and not meant for direct invocation by users:<br />
* spsh_chkrange.m<br />
* spsh_prstype.m<br />
* getusedrange.m<br />
* calccelladdress.m<br />
* parse_sp_range.m<br />
<br />
<br />
==== Required support software ====<br />
For the OCT interface (since 1.2.4/1.2.5, read-only support!):<br />
* Nothing except unzip<br />
<br />
For Windows (MingW):<br />
* Octave with Java package (preferrably >= 1.2.8, although 1.2.6 will do for most functionality)<br />
<br />
For Linux:<br />
* Octave with Java package (preferrably >= 1.2.8, although 1.2.5 will do for most functionality)<br />
<br />
For ODS access, you'll need to choose at least one of the following java class files collections:<br />
* (currently the preferred option) odfdom.jar (only versions 0.7.5, 0.8.6, 0.8.7 and 0.8.8 work OK!) & xercesImpl.jar (NOTE: only version 2.9.1 dated 14 Sep 2007 has been confirmed to work with odfdom 0.8.7 and earlier. odfdom-0.8.8 hasn't been tested with other xercesImpl.jar releases yet). Get them here:<br />
** http://incubator.apache.org/odftoolkit/downloads.html (contains odfdom-0.8.8)<br />
** http://www.google.com/search?ie=UTF-8&oe=utf-8&q=xerces-2.9.1+download<br />
* jopendocument<version>.jar. Get it from http://www.jopendocument.org (jOpenDocument 1.3 (final) is the most recent one and recommended for Octave).<br />
* OpenOffice.org (or clones like LibreOffice, Go-Office, ...). Get it from http://www.openoffice.org or www.libreoffice.org. The relevant Java class libs are unoil.jar, unoloader.jar, jurt.jar, juh.jar and ridl.jar (which are scattered around the OOo installation directory), while also the <OOo>/program/ directory needs to be in the classpath.<br />
<br />
These must be referenced with full pathnames in your javaclasspath. <br />
Hint: add it in ./share/octave/<version>/m/startup/octaverc using appropriate javaaddpath statements.<br />
Alternatively, the io package contains a function script file "chk_spreadsheet_support.m" which can set up the Java classpath.<br />
<br />
==== Usage ====<br />
<br />
(see “help ods<function_filename>” in octave terminal.)<br />
<br />
odsread is a sort of analog to xlsread and works more or less the same. odsread is a mere wrapper for the functions odsopen, ods2oct, and odsclose that do file access and the actual reading, plus parsecell for post-processing.<br />
<br />
odswrite works similar to xlswrite. It too is a wrapper for scripts which do the actual work and invoke other scripts, a.o. oct2ods.<br />
<br />
odsfinfo can be used to explore odsfiles with unknown content for sheet names and to get an impression of the data content sizes.<br />
When you need data from just one sheet, odsread is for you. But when you need data from multiple sheets in the same spreadsheet file, or if you want to process spreadsheet data by limited-size chunks at a time, odsopen / ods2oct [/parsecell] / … / odsclose sequences provides for much more speed and flexibility as the spreadsheet needs to be read just once rather than repeatedly for each call to odsread.<br />
<br />
Same reasoning goes for odswrite.<br />
<br />
Also, if you use odsopen / …../, you can process multiple spreadsheets simultaneously – just use odsopen repeatedly to get multiple spreadsheet file pointers.<br />
<br />
Moreover, after adding data to an existing spreadsheet file, you can fiddle with the filename in the ods file pointer struct to save the data into another, possibly new spreadsheet file.<br />
<br />
If you use odsopen / ods2oct / … / oct2ods / …. / odsclose, DO NOT FORGET to invoke odsclose in the end. The file pointers can contain an enormous amount of data and may needlessly keep precious memory allocated. In case of the UNO interface, the hidden OpenOffice.org invocation (soffice.bin) can even block proper closing of Octave.<br />
<br />
==== Spreadsheet formula support ====<br />
<br />
When using the OTK or UNO interface you can:<br />
* (When reading, ods2oct) either read spreadsheet formula results, or the literal formula text strings;<br />
* (When writing, oct2ods) either enter formulas in the worksheet as formulas, or enter them as literal text strings.<br />
<br />
In short, you can enter spreadsheet formulas and in a later stage read them back, change them and re-enter them in the worksheet. The behaviour is controlled by an option structure options (as last argument to oct2ods.m and ods2oct.m) which for now has only one (logical) field:<br />
* options.formulas_as_text = 0 (the default) implies enter formulas as formulas and read back formula results<br />
* options.formulas_as_text =1 (or any positive integer) means enter formulas as text strings and read them back as text strings.<br />
<br />
Be aware that there's no formula evaluator in ODS java, not even a formula validator. So if you create formulas in your spreadsheet using oct2ods or odswrite, do not expect meaningful results when reading those files later on unless you open them in OpenOffice.org Calc and write them back to disk.<br />
You can write all kind of junk as a formula into a spreadsheet cell. There's not much validity checking built into odfdom.jar. I didn't bother to try OpenOffice.org Calc to read such faulty spreadsheets, so I don't know what will happen with spreadsheets containing invalid formulas. But using the above options, you can at least repair them using octave....<br />
<br />
The only exception is if you select the UNO interface, as that invokes OpenOffice.org behind the scenes, and OOo obviously has a validator and evaluator built-in.<br />
<br />
==== Gotchas ====<br />
I know of one big gotcha: i.e. reading dates (& time). A less obvious one is Java memory pool allocation size.<br />
<br />
===== Date and time in ODS =====<br />
Octave (as does Matlab) stores dates as a number representing the number of days since January 1, 0 (and as an aside ignores a.o. Pope Gregorius' intervention in 1582 when 10 days were simply skipped).<br />
<br />
OpenOffice.org stores dates as text strings like “yyyy-mm-dd”.<br />
<br />
MS-Excel stores dates as a number representing the number of days since January 1, 1900 (and as an aside, erroneously assumes 1900 to be a leap year). (Why mention MS-Excel here? See below:) <br />
<br />
Now, converting OpenOffice.org date cell values (actually, character strings flagged by “date” attributes) into Octave looks pretty straightforward. But when the ODS spreadsheet was originally an Excel spreadsheet converted by OpenOffice.org, the date cells can either be OOo date values (i.e.,strings) OR old numerical values from the Excel spreadsheet.<br />
<br />
So: you should carefully check what happens to date cells.<br />
<br />
As octave has no ”date” or “time” data type, octave date values (usually numerical data) are simply transferred as “floats” to ODS spreadsheets. You'll have to convert the values into dates yourself from within OpenOffice.org.<br />
<br />
While adding data and time values has been implemented in the write scripts, the wait is for clever solutions to distinguish dates from floats in octave cell arrays.<br />
<br />
===== Java memory pool allocation size =====<br />
The Java virtual machine (JVM) initializes one big chunk of your computer's RAM in which all Java classes and methods etc. are to be loaded: the Java memory pool. It does this because Java has a very sophisticated “garbage collection” system. At least on Windows, the initial size is 2MB and the maximum size is 64MB. On Linux this allocated size is much bigger. This part of memory is where the Java-based ODS octave routines (and the Java-based ods routines) live and keep their variables etc.<br />
<br />
For transferring large pieces of information to and from spreadsheets you might hit the limits of this pool. E.g. to be able to handle I/O of an array of around 50,000 cells I needed a memory pool size of 512 MB.<br />
<br />
The memory size can be increased by inserting a file called “java.opts” (without quotes) in the directory ./share/octave/packages/java-<version> (where the script file javaclasspath.m is located), containing just the following lines:<br />
<pre><nowiki><br />
-Xms16m<br />
-Xmx512m<br />
</nowiki></pre><br />
(where 16 = initial size, 512 = maximum size (in this example), m stands for Megabyte. This number is system-dependent).<br />
<br />
After processing a large chunk of spreadsheet information you might notice that octave's memory footprint does not shrink so it looks like Java's memory pool does not shrink back; but rest assured, the memory footprint is the allocated (reserved) memory size, not the actual used size. After the JVM has done its garbage collection, only the so-called “working set” of the memory allocation is really in use and that is a trimmed-down part of the memory allocation pool. On Windows systems it often suffices to minimize the octave terminal for a few seconds to get a more reasonable memory footprint.<br />
<br />
===== Reading cells containing errors =====<br />
Spreadsheet cells containing erroneous stuff are transferred to Octave as NaNs. But not all errors can be catched. Cells showing #Value# in OpenOffice.org Calc due to e.g., invalid formulas, may have a 0 (zero) value stored in the value fields. It is impossible to catch this as there is no run-time formula evaluator (yet) in ODF Toolkit nor jOpenDocument (like there is in Apache POI for Excel).<br />
<br />
Smaller gotcha's :<br />
* while reading, empty cells are sometimes not skipped but interpreted with numerical value 0 (zero).<br />
<br />
NOT fixed in jOpenDocument version 1.2 & 1.3 final:<br />
* jOpenDocument doesn't set the so-called <office:value-type='string'> attribute in cells containing text; as a consequence ODF Toolkit will treat them as empty cells. OOo will read them OK.<br />
<br />
==== Matlab compatibility ====<br />
AFAIK there's no similar functionality in Matlab (yet?), only for reading and then very limited.<br />
odsread is fairly function-compatible to xlsread, however.<br />
<br />
Same goes for odswrite, odsfinfo and xlsfinfo – however odsfinfo has better functionality IMO.<br />
<br />
==== Comparison of interfaces ====<br />
The OCT interface (present as of io-1.2.4) offers read support for ODS 1.2, complete with all the options of ODFtoolkit and UNO, but fairly slow.<br />
<br />
The OTK interface (ODFtoolkit) is the one that gives the best (but slow) results at present. However, parsing xml trees into rectangular arrays is not quite straightforward and the other way round is a real nightmare; odftoolkit up til 0.7.5. did little to hide the gory details for the developers.<br />
<br />
While reading ODS is still OK, writing implies checking whether cells already exist explicitly (in table:table-cells) or implicitly (in number-columns-repeated or number-rows-repeated nodes) or not at all yet in which case you'll need to add various types of parent nodes. Inserting new cells (“nodes”) or deleting nodes implies rebuilding possibly large parts of the tree in memory - nothing for the faint-of-heart. Only with ODFToolkit (odfdom) 0.8.6 and 0.8.7 things have been simplified for developers.<br />
<br />
The JOD (jOpenDocument) interface is more promising, as it does shield the xml tree details and presents developers something which looks like a spreadsheet model.<br />
<br />
However, unfortunately the developers decided to shield essential methods by making them 'protected' (e.g. the vital getCellType). JopenDocument does support writing. But OTOH many obvious methods are still lacking and formula support is absent.<br />
And last (but not least) the jOpenDocument developers state that their development is primarily driven by requests from customers who pay for support. I do sympathize with this business model but for octave needs this may hamper progress for a while.<br />
<br />
The (still experimental) UNO interface, based on a Java/UNO bridge linking a hidden OpenOffice.org invocation to Octave, is the most promising:<br />
* admittedly OOo needs some tens of seconds to start for the first time, but once OOo is in the operating system's disk cache, it operates much faster than ODF or JOD;<br />
* it has built-in formula validator and evaluator;<br />
* it has a much more reliable data parser;<br />
* it can read much more spreadsheet formats than just ODS; .sxc (older OOo and StarOffice), but also .xls, .xlsx (Excel), .wk1 (Lotus 123), dbf, etc.<br />
* it consumes only a fraction of the JVM heap memory that the other Java ODS spreadsheet solutions need because OOo reads the spreadsheet in its own memory chunk in RAM. The other solutions read, expand, parse and manipulate all data in the JVM. In addition, OOo's code is outside the JVM (and Octave) while the ODF Toolkit and jOpenDocument classes also reside in the JVM. <br />
<br />
However, UNO is not stable yet (see below).<br />
<br />
==== Troubleshooting ====<br />
Some hints for troubleshooting ODS support are given here.<br />
Since April 2011 the function chk_spreadsheet_support() has been included in the io package. Calling it with arguments ('', 3) (empty string and debug level 3) will echo a lot of diagnostics to the screen. Large parts of the steps outlined below have been automated in this script.<br />
Problems with UNO are too complicated to treat them here; most of the troubleshooting has been implemented in chk_spreadsheet_support.m, only some general guidelines are given below.<br />
# Check if Java works. Do a pkg list and see<br />
## If there's a Java package mentioned (then it's installed). If not, install it.<br />
## If there's an asterisk on the java package line (then the package is loaded). If not, do a pkg rebuild-auto java<br />
# Check Java memory settings. Try javamem<br />
## If it works, check if it reports sufficiently large max memory (had better be 200 MiB, the bigger the better)<br />
## If it doesn't work, do:<br />
##:<pre><br />
##:rt = java_invoke ('java.lang.Runtime', 'getRuntime')<br />
##:rt.gc<br />
##:rt.maxMemory ().doubleValue () / 1024 / 1024 # show MaxMemory in MiB.</pre><br />
## In case you have insufficient memory, see in [[#Gotchas]], [[#Java memory pool allocation size]], how to increase java's memory pre-reservation.<br />
# Check if all classes (.jarfiles) are in class path. Do a 'jcp = javaclasspath (-all)' (under unix/linux, do 'jcp = javaclasspath; strsplit (jcp,”:”)' (w/o quotes). See above under [[#Required support software]] what classes should be mentioned.<br />
## If classes (.jar files) are missing, download and put them somewhere and add them to the javaclass path with their fully qualified pathname (in quotes) using javaaddpath().<br />
## Once all classes are present and in the javaclasspath, the ods interfaces should just work. The only remaining showstoppers are insufficient write privileges for the working directory, a wrecked up octave or some other problems outside octave.<br />
# Try opening an ods file:<br />
## ods1 = odsopen ('test.ods', 1, 'otk'). If this works and ods1 is a struct with various fields containing objects, ODF toolkit interface (OTK) works. Do an ods1 = odsclose (ods1) to close the file.<br />
## ods2 = odsopen ('test.ods', 1, 'jod'). If this works and ods2 is a struct with various fields containing objects, jOpenDocument interface (JOD) works as well. Do ods2 = odsclose (ods2) to close the file.<br />
# For the UNO interface, at least version 1.2.8 of the Java package is needed plus the following Java class libs (jars) and directory:<br />
** unoil.jar (usually found in subdirectory Basis<version>/program/classes/ or the like of the OpenOffice.org (<OOo>) installation directory;<br />
** juh.jar, jurt.jar, unoloader.jar and ridl.jar, usually found in the subdirectory URE/share/java/ (or the like) of OOo's installation directory;<br />
** The subdirectory program/ (where soffice[.exe] (or ooffice) resides).<br />
** The exact case (URE or ure, Basis or basis), name ("Basis3.2" or just "basis") and subdirectory tree (URE/java or URE/share/java) varies across OOo versions and -clones, so chk_spreadsheet_support.m can have a hard time finding all needed classes. In particularly bad cases, when chk_spreadsheet_support cannot find them, you might need to add one or more of these these classes manually to the javaclasspath.<br />
<br />
==== Development ====<br />
As with the Excel r/w stuff, adding new interfaces should be easy and straightforward. Add relevant stanzas in odsopen, odsclose, odsfinfo & getusedrange and add new subfunctions (for the real work) to getusedrange_<INTF>, oct2ods and ods2oct.<br />
<br />
Suggestions for future development:<br />
* Reliable and easy ODS write support (maybe when jOpenDocument is more mature)<br />
* Speeding up (ODS is 10 X slower than e.g. OOXML !!!). jOpenDocument is much faster but still immature. UNO ''is'' MUCH faster than jOpenDocument but starting up OpenOffice.org for the first time can take tens of seconds... Note that UNO is still experimental. The issue is that odsclose() will simply kill ALL other OpenOffice.org invocations, also those that were not opened through Octave! This is related to UNO-Java limitations. The underlying issue is that when Octave starts an OpenOffice.org invocation, OpenOffice.org must be closed for Octave to be able to exit; otherwise Octave will wait for OOo to shut down before it can terminate itself. So Octave must kill OOo to be able to terminate. A way out hasn't been found yet.<br />
* ''Passing function handle'' a la Matlab's xlsread<br />
* Adding styles (borders, cell lay-out, font, etc.)<br />
<br />
Some notes on the choice for Java:<br />
# It saves a LOT of development time to use ready-baked Java classes rather than developing your own routines and thus effectively reinvent the wheel.<br />
# A BIG advantage is that a Java-based solution is platform-independent (''portable'').<br />
# But Java is known to be not very conservative with resources, especially not when processing XML-based formats.<br />
<br />
So Java is a compromise between portability and rapid development time versus capacity (and speed).<br />
But IMO data sets larger than 5.105 cells should not be kept in spreadsheets anyway. Use real databases for such data sets.<br />
<br />
==== ODFDOM versions ====<br />
I have tried various odfdom version. As to 0.8 & 0.8.5, while the API has been simplified enormously (finally one can address cells by spreadsheet address rather than find out yourself by parsing the table-column/-row/-cell structure), many irrecoverable bugs have been introduced :-((<br />
In addition processing ODS files became significantly slower (up to 7 times!).<br />
<br />
End of August 2010 I have implemented support for odfdom-0.8.6.jar – that version is at last sufficiently reliable to use. The few remaining bugs and limitations could easily be worked around by diving in the older TableTable API. Later on versions 0.8.7 and 0.8.8 have been tested too - these needed a few adjustments; clearly the odfdom API (currently at main version 0) is not stable yet. Version 0.8.9 introduced an undocumented dependency on some obscure Java class lib - I think due to a bit sloppy development procedures. Anyway I couldn't get it to work.<br />
So at the moment (Summer 2013 = last I looked) only odfdom versions 0.7.5, 0.8.6, 0.8.7 and 0.8.8 are supported.<br />
<br />
If you want to experiment with odfdom 0.8 & 0.8.5, you can try:<br />
* odsopen.m (revision 7157)<br />
* ods2oct.m (revision 7158)<br />
* oct2ods.m (revision 7159)<br />
<br />
=== XLS support ===<br />
==== Files content ====<br />
* '''xlsread.m''' &mdash; All-in-one function for reading data from one specific worksheet in an Excel spreadsheet file. This script has Matlab-compatible functionality.<br />
* '''xlswrite.m''' &mdash; All-in-one function for writing data to one specific worksheet in an Excel spreadsheet file. This script has Matlab-compatible functionality.<br />
* '''xlsfinfo.m''' &mdash; All-in-one function for exploring basic properties of an Excel spreadsheet file. This script has Matlab-compatible functionality.<br />
* '''xlsopen.m''' &mdash; Function for "opening" (= providing a handle to) an Excel spreadsheet file ("workbook"). This function sorts out which interface to use for .xls access (i.e.,COM; Java & Apache POI; JexcelAPI; OpenXLS; etc.), but it's choice can be overridden.<br />
* '''xls2oct.m''' &mdash; Function for reading data from a specific worksheet pointed to in a struct created by xlsopen.m. xls2oct can be called multiple times consecutively using the same pointer struct, each time allowing to read data from different ranges and/or worksheets. Data are returned in the form of a 2D heterogeneous cell array that can be parsed by parsecell.m. xls2oct is a mere wrapper for interface-dependent scripts that do the actual low-level reading.<br />
* '''oct2xls.m''' &mdash; Function for writing data to a specific worksheet pointed to in a struct created by xlsopen.m. octxls can be called multiple times consecutively using the same pointer struct, each time allowing to write data to different ranges and/or worksheets. oct2xls is a mere wrapper for interface-dependent scripts that do the actual low-level writing.<br />
* '''xlsclose.m''' &mdash; Function for closing (the handle to) an Excel workbook. When data have been written to the workbook oct2xls will write the workbook to disk. Otherwise, the file pointer is simply closed and possibly used interfaces for Excel access (COM/ActiveX/Excel.exe) will be shut down properly.<br />
* '''parsecell.m''' &mdash; Function for separating the data in raw arrays returned by xls2oct, into numerical/logical and text (cell) arrays.<br />
* '''chk_spreadsheet_support.m''' &mdash; Internal function for (1) checking, (2) setting up, (3) debugging spreadsheet support. While not specifically meant for direct invocation from the Octave prompt (it is more useful during initialization of Octave itself) it can be very helpful when hunting down issues with spreadsheet support in Octave.<br />
* '''spsh_chkrange.m''', '''spsh_prstype.m''', '''getusedrange.m''', '''calccelladdress.m''', '''parse_sp_range.m''' &mdash; Support files called by the scripts and not meant for direct invocation by users.<br />
<br />
==== Required support software ====<br />
For the OCT interface (since 1.2.4/1.2.5, read-only support for OOXML (.xlsx)!):<br />
* Nothing except unzip<br />
<br />
For the Excel/COM interface:<br />
* A windows computer with Excel installed. Note that 64-bit MS-Office has no support for COMx /ActiveX so you might have to resort to the Java interfaces below<br />
* Octave Forge Windows-1.0.8 or later package WITH LATEST SVN PATCHES APPLIED. Currently (2013) windows-1.2.1 is the best option.<br />
<br />
For the Java / Apache POI / JExcelAPI interfaces (general):<br />
* octave Forge java-1.2.8 package or later version on Linux<br />
* octave Forge java-1.2.8 with latest svn fixes on Windows/MingW<br />
* Java JRE or JDK > 1.6.0 (hasn't been tested with earlier versions). Although not an Octave issue, as to security you'd better get the latest Java version anyway.<br />
<br />
Apache POI specific:<br />
* class .jars: '''poi-3.5-FINAL-<date>.jar & poi-ooxml-3.5-FINAL-<date>.jar''' (or later versions) in classpath<br />
** Get it here: http://poi.apache.org/download.html<br />
* for OOXML support (only available with Apache POI): '''poi-ooxml-schemas-<version>.jar''', '''xbean.jar''' or '''xmlbeans.jar''', '''dom4j-1.6.1.jar''' in javaclasspath.<br />
** Get them here: http://poi.apache.org/download.html ("xmlbeans" and poi-ooxml-schemas) or http://sourceforge.net/projects/dom4j/files (dom4j-<version>)<br />
<br />
JExcelAPI specific:<br />
* class .jar: jxl.jar in classpath<br />
** Get it here: http://sourceforge.net/projects/jexcelapi/files/<br />
<br />
OpenXLS specific:<br />
* class .jar: jxl.jar in classpath<br />
** Get it here: http://sourceforge.net/projects/openxls/<br />
<br />
These class libs must be referenced with full pathnames in your javaclasspath.<br />
<br />
They had best be put in /<libdir>/java where <libdir> on Linux is usually /usr/lib; on MinGW it is usually /lib. The PKG_ADD command expects the class libs there; if they are elsewhere, add them in ./share/octave/<version>/m/startup/octaverc using appropriate javaaddpath statements or a chk_spreadsheet_support() call.<br />
<br />
UNO specific (invoking OpenOffice.org (or clones) behind the scenes):<br />
<br />
NOTE: EXPERIMENTAL!! A working OpenOffice.org installation. The utility function chk_spreadsheet_support can be used to add the needed entries to the javaclasspath.<br />
<br />
==== Usage ====<br />
'''xlsread''' and '''xlswrite''' are mere wrappers for '''xlsopen - xls2oct - xlsclose - parsecell''' and '''xlsopen - oct2xls - xlsclose''' sequences, resp. They exist for the sake of Matlab compatibility.<br />
<br />
'''xlsfinfo''' can be used for finding out what worksheet names exist in the file. For OOXML files you can do with the OCT interface (specify "oct" for the REQINTF parameter). For other Excel file types you need MS-Excel for Windows (or later version) and the windows package (specify "com" for REQINTF), and/or Apache POI and Java support (then the input parameter REQINTF should be specified with a value of 'poi' (case-insensitive) and -obviously- the complete POI interface must have been installed).<br />
<br />
Invoking '''xlsopen'''/..../'''xlsclose''' directly provides for much more flexibility, speed, and robustness than '''xlsread''' / '''xlswrite'''. Indeed, using the same file handle (pointer struct) you can mix reading & writing before writing the workbook out to disk using xlsclose.<br />
<br />
And: xlsopen / xlsclose hide the gory interface details from the user.<br />
<br />
Currently only .xls files (BIFF8) can be read/written; using JExcelAPI BIFF5 can be read as well. For OOXML files either Excel 2007 for Windows (or higher) and/or the complete Apache POI interface must be installed (and probably the REQINTF parameter specified with a value of 'poi').<br />
<br />
When using '''xlsopen'''/.../'''xlsclose''' be sure to keep track of the file handle struct.<br />
<br />
A possible scenario:<br />
<br />
xlh = xlsopen (<excel_filename> , [rw], [<requested interface>])<br />
# Set rw to 1 if you want to write to a workbook immediately.<br />
# In that case the check for file existence is skipped and<br />
# -if needed- a new workbook created.<br />
# If you really want an other interface than auto-selected<br />
# by xlsopen you can request that. But xlsopen still checks<br />
# proper support for your choice.<br />
<br />
# Read some data<br />
[ rawarr1, xlh ] = xls2oct (xlh, <SomeWorksheet>, <Range>)<br />
# Be sure to specify xlh as output argument as xls2oct keeps<br />
# track of changes and the need to write the workbook to disk<br />
# in the xlhstruct. And the origin range is conveyed through<br />
# the xlh pointer struct.<br />
<br />
# Separate data into numeric and text data<br />
[ numarr1, txtarr1, lim1 ] = parsecell (rawarr1)<br />
<br />
# Get more data from another worksheet in the same workbook<br />
[ rawarr2, xlh ] = xls2oct (xlh, <SomeOtherWorksheet>, <Range>)<br />
[ numarr2, txtarr2, lim2 ] = parsecell (rawarr2)<br />
<br />
# <... Analysis and preparation of new data in cell array Newdata....><br />
<br />
# Add new data to spreadsheet<br />
xlh = oct2xls (Newdata, xlh, <AnotherWorksheet>, <Range>)<br />
<br />
# Close the workbook and write it to disk; then clear the handle<br />
xlh = xlsclose (xlh)<br />
clear xlh<br />
<br />
When not using the COM interface, specify a value of 'POI' for parameter REQINTF when accessing OOXML files in xlsread, xlswrite, xlsopen, xlsfinfo (and be sure the complete Apache POI interface is installed). If you haven't got ActiveX installed (i.e., not having MS-Excel under Windows) specifying 'POI' may not be needed as in such cases Apache POI is the next default interface.<br />
<br />
When using JExcelAPI (JXL), after writing into a worksheet you MUST save the file – adding data to the same or another worksheet is no more possible after the first call to oct2xls(). This is a limitation of JExcelAPI.<br />
<br />
==== Spreadsheet formula support ====<br />
When using the COM, POI, JXL, and UNO interfaces you can:<br />
* (When reading, xls2oct) either read spreadsheet formula results, or the literal formula text strings (also works with OCT interface);<br />
* (When writing, oct2xls) either enter formulas in the worksheet as formulas, or enter them as literal text strings.<br />
<br />
In short, you can enter spreadsheet formulas and in a later stage read them back, change them and re-enter them in the worksheet. <br />
<br />
The behaviour is controlled by an option structure options which for now has only one (logical) field:<br />
* options.formulas_as_text = 0 (the default) implies enter formulas as formulas and read back formula results<br />
* options.formulas_as_text =1 (or any positive integer) means enter formulas as text strings and read them back as text strings.<br />
<br />
Be aware that there's no formula evaluator in JExcelAPI (JXL) nor OpenXLS (OXS). So if you create formulas in your spreadsheet using oct2xls or xlswrite with 'JXL' or 'OXS', do not expect meaningful results when reading those files later on ,unless you open them in Excel and write them back to disk.<br />
<br />
While both Apache POI and JExcelAPI feature a formula validator, not all spreadsheet functions present in Excel have been implemented (yet).<br />
Worse, older Excel versions feature less functions than newer versions. So be wary as this may make for interesting confusion.<br />
<br />
==== Matlab compatibility ====<br />
<br />
'''xlsread''', '''xlswrite''' and '''xlsfinfo''' are for the most part Matlab-compatible. Some small differences are mentioned below.<br />
<br />
* xlsread<br />
** Matlab's xlsread supports invoking extra functions while reading ("passing function handle"); octave not. But this can be simulated outside xlsread.<br />
** Matlab's xlsread flags some spreadsheet errors, Octave Forge just returns blank cells.<br />
** Octave Forge returns info about the actual (rather than the requested) cell range where the data came from. Personally I find it very useful to know from what part of a worksheet the data originate so I've put quite some effort in it :-) Matlab can't, due to Excel automatically trimming returned arrays from empty outer columns and rows. Octave is more clever but the Visual Basic call used for determining the actually used range has some limitations:<br />
**# it relies on cached range values and thus may be out-of-date;<br />
**# it counts empty formatted cells too. When using ActiveX/COM, if octave's xlsfinfo.m returns wrong data ranges it is most often an overestimation.<br />
*:Matlab's xlsread ignores all non-numeric data values outside the smallest rectangle encompassing all numerical values. Octave's xlsread doesn't. This means that Matlab ignores all row/column headers, not very user-friendly IMO.<br />
** When using the Java interface, reading and writing xls-files by Octave Forge is platform-independent. On systems w/o installed Excel, Matlab can only read Excel 95 formatted .xls files (written using ML xlswrite's 'Basic" option) – and then differently than under Windows.....<br />
** Matlab's xlsread returns strings for cells containing date values. This makes for endless if-then-elseif-else-end constructs to catch all expected date formats. Octave returns numerical data (where 0 = 1/1/1900 – you can easily transfer them into proper octave date values yourself using e.g. datestr(), see bottom of this document for more info). For dates before 1/1/1900, Octave returns dates as text strings.<br />
** Matlab's xlsread invokes csvread if no Excel interface is present. Octave Forge's xlsread doesn't.<br />
** Octave can read either formula results (evaluated formulas) or the formula text strings; Matlab can't.<br />
<br />
* xlswrite<br />
** Octave Forge's xlswrite works on systems w/o Excel support, Matlab's doesn't (properly).<br />
**When specifying a sheet number larger than the number of existing sheets in an .xls file, Matlab's xlswrite adds empty sheets until the new sheet number is created; Octave's xlswrite only adds one sheet called "Sheet<number>" where <number> is the specified sheet number.<br />
** Even better (IMO) while M's xlswrite always creates Sheet1/Sheet2/Sheet3 when creating a new spreadsheet, octave's xlswrite only creates the requested worksheet. (Did you know that you can instruct Excel to create spreadsheets with just one, or any number of, worksheets? Look in Tools | Options, General tab.)<br />
** Oh and octave doesn't touch the "active sheet" - but that's not automatically an advantage.<br />
** If the specified write range is larger than the actual data array, Matlab's xlswrite adds #N/A cells to fill up the lowermost rows and rightmost columns; Octave Forge's xlswrite doesn't.<br />
<br />
* xlsfinfo<br />
** When invoking Excel/COM interface, Octave Forge's xlsfinfo also echoes the type of sheet (worksheet, chart), not just the sheet names. Using Java I haven't found similar functionality (yet).<br />
<br />
==== Comparison of interfaces & usage ====<br />
Using Excel itself (through '''COM''' / '''ActiveX''' on Windows systems) is probably the most robust and versatile and especially FAST option. There's one gotcha: in case of some type of COM errors Excel will keep running invisibly; you can only end it through Task Manager. A tiny problem is that one cannot find out easily through COM what file types are supported; xls, wks, wk1, xlsx, etc. Another -obvious- limitation is that COM Excel access only works on Windows systems where Excel is installed.<br />
<br />
'''JExcelAPI''' (Java-based and therefore platform-independent) is proven technology but switching between reading and writing is quite involved and memory-hungry when processing large spreadsheets. As the docs state, JExcelAPI is optimized for reading and it does do that well - but still slower than Excel/COM. The fact that upon a switch from reading to writing the existing spreadsheet is overwritten in place by a blank one and that you can only get the contents back wen writing out all of the changes is worrying - and any change after the first write() is lost as a next write() doesn't seem to work, worse yet, you may completely loose the spreadsheet in question. The first is by JExcelAPI design, the second is probably a bug (in Octave Forge/Java or JExcelAPI ? I don't know). Adding data to existing spreadsheets does work, but IMO undue user confidence is needed. JExcelAPI supports BIFF5 (only reading) and BIFF8 (Excel 95 and Excel 97-2003, respectively). Upon overwriting, BIFF5 spreadsheets are converted silently to BIFF8. JexcelAPI, unlike ApachePOI, doesn't evaluate functions while reading but instead relies on cached results (i.e. results computed by Excel itself). Depending on Excel settings ("Automatic calculation" ON or OFF) this may or may not yield incorrect (or expected) results.<br />
<br />
'''Apache POI''' (Java-based and platform-independent too) is based on the OpenOffice.org I/O Excel r/w routines. It is a more versatile than JExcelAPI, while it doesn't support BIFF5 it does support BIFF8 (Excel 97 – 2003) and OOXML (Excel 2007). It is slower than native JXL let alone Excel & COM but it features active formula evaluation, although at the moment (v. 3.8) not all Excel functions have been implemented. Obviously, as new functions are added in every new Excel release it's hard to catch up for Apache POI. I've made the relevant subfunction (xls2jpoi2oct) fall back to cached formula results (and yield a suitable warning) for non-implemented Excel functions while reading Excel files.<br />
<br />
'''OpenXLS''' (an open source version of Extentech's commercial Java-xls product) is still experimental. It seems to work faster than JExcelAPI, but it has other issues - i.e., it locks the .xls file and the unlocking mechanism is a bit wonky. Sometimes xls files keep being locked until Octave is shut down. Currently OXS write support is disabled (but the code is there).<br />
<br />
'''UNO''' (invoking OpenOffice.org or clones behind the scenes, a la ActiveX) is experimental. It works FAST (i.e., once OOo itself is loaded which can take some time) and can process much larger spreadsheets than the other Java-based interfaces because the data are not entered in the JVM but in OOo's memory. A big stumbling block is that odsclose() on a UNO xls struct will kill ALL OpenOffice.org invocations, also those that were not related to Octave! This is due to UNO-Java limitations. The underlying issue is that when Octave starts an OpenOffice.org invocation, OpenOffice.org must be closed for Octave to be able to exit; otherwise Octave will wait for OOo to shut down before it can terminate itself. So Octave must kill OOo to be able to terminate. A way out hasn't been found yet.<br />
<br />
All in all, of the three Java options I'd prefer Apache POI rather than OpenXLS or JexcelAPI. But the latter is indispensable for BIFF5 formats. Once UNO is stable it is to be preferred as it can read ALL file formats supported by OOo (viz. wk1, ods, xlsx, sxc, ...)<br />
<br />
'''OCT''' offers read support for OOXML files (.xlsx) only, but it is by far the fastest read option; faster than Excel itself.<br />
<br />
Some notes on the choice for Java:<br />
# It saves a LOT of development time to use ready-baked Java classes rather than developing your own routines and thus effectively reinvent the wheel.<br />
# A BIG advantage is that a Java-based solution is platform-independent ("portable").<br />
# But Java is known to be not very conservative with resources, especially not when processing XML-based formats.<br />
<br />
So Java is a compromise between portability and rapid development time versus capacity (and speed). But IMO data sets larger than 5.10^5 cells should not be kept in spreadsheets anyway. Better use real databases for such data sets.<br />
<br />
==== Troubleshooting ====<br />
Some hints for troubleshooting Excel support are contained in this thread: http://sourceforge.net/mailarchive/forum.php?thread_name=4C61B649.9090802%40hccnet.nl&forum_name=octave-dev dated August 10, 2010. A more structured approach is below.<br />
<br />
Since April 2011 a special purpose setup file has been included in the io package (chk_spreadsheet_support.m). Large parts of the approach below (starting at Step 2) have been automated in this script. When running it with the second input argument (debug level) set to 3 a lot of useful diagnostic output will be printed to screen.<br />
#Check if COM / ActiveXworks (only under Windows OS). Do a ''pkg list'' and see:<br />
##If there's a windows package mentioned (then it's installed). If not, install it.<br />
##If there's an asterisk on the windows package line (then the package is loaded). If not, do a pkg load windows<br />
#Check if the ActiveX server works. Do:<br />
#:exl = actxserver ('Excel.Application') ## Note the period between 'Excel' and 'Application'<br />
##If a COM object is returned, ActiveX / COM / Excel works. Do:<br />
##:<pre>exl.Quit(); delete (exl) ## to shut down the (hidden) Excel invocation.</pre><br />
##If you get an error message, your last resort is re-installing the windows package, or trying the Java-based interfaces.<br />
#Check if java works. Do a ''pkg list'' and see:<br />
##If there's a java package mentioned (then it's installed). If not, install it.<br />
##If there's an asterisk on the java package line (then the package is loaded). If not, do a pkg rebuild -auto java<br />
#Check Java memory settings. Try<br />
#:<pre>javamem</pre><br />
##If it works, check if it reports sufficiently large max memory (had better be 200 MiB, the bigger the better)<br />
##If it doesn't work, do:<br />
##:<pre><br />
##:rt = java_invoke ('java.lang.Runtime', 'getRuntime')<br />
##:rt.gc<br />
##:rt.maxMemory ().doubleValue () / 1024 / 1024 ## show MaxMemory in MiB.</pre><br />
##In case you have insufficient memory, see in "GOTCHAS", "Java memory pool allocation size", how to increase java's memory pre-reservation.<br />
#Check if all classes (.jarfiles) are in class path. Do a 'javaclasspath' (under unix/linux, do 'tmp = javaclasspath; strsplit (tmp,":")' (w/o quotes). See above under "REQUIRED SUPPORT SOFTWARE" what classes should be mentioned.<br />
** If classes (.jar files) are missing, download and put them somewhere and add them to the javaclass path with their fully qualified pathname (in quotes) using javaaddpath().<br />
** Once all classes are present and in the javaclasspath, the xls interfaces should just work. The only remaining showstoppers are insufficient write privileges for the working directory, a wrecked up octave or some other problem outside octave.<br />
#Try opening an xls file: <br />
#: xls1 = xlsopen ('test.xls', 1, 'poi'). If this works and xls1 is a struct with various fields containing objects, the Apache POI interface (POI) works. Do an xls1 = xlsclose (xls1) to close the file.<br />
#: xls2 = xlsopen ('test.xls', 1, 'jxl'). If this works and xls2 is a struct with various fields containing objects, the JExcelAPI interface (JXL) works as well. Don't forget to do xls2 = xlsclose (xls2) to close the file.<br />
<br />
==== Development ====<br />
xlsopen/xlsclose and friends have been written so that adding other interfaces (Perl? native octave? ...?) should be very easily accomplished. Xlsopen.m merely needs two stanzas, xlsfinfo.m and getusedrange.m each need an additional elseif stanza, and xlsclose.m needs a small stanza for closing the pointer struct and writing to disk. The real work lies in creating the relevant xls2<...>2oct & oct2<...>2xls & <getusedrange_...> subfunction scripts in xls2oct.m, oct2xls.m and getusedrange.m, resp., but that shouldn't be really hard, depending on the interface support libraries' quality and documentation. Separating the file access functions and the actual reading/writing from/to the workbook in memory has made developer's life (I mean: my time developing this stuff) much easier.<br />
<br />
Some other options for development (who?):<br />
*Speeding up, especially Java worksheet/cell access. For cracks, not me.<br />
*Automatic conversion of Excel date/time values into octave ones and vice versa (adding or subtracting 636960). But then again Excel's dates are 01-01-1900 based (octave's 0-0-0000) and buggy (Excel thinks 1900 is a leap year), and I sometimes have to use dates from before 1900. Maybe as an option?<br />
*Creating Excel graphs (a significant enterprise to write from scratch).<br />
*Support for "passing function handle" in xlsread.<br />
<br />
=== OCT interface ===<br />
<br />
Since io package version 1.2.4, an interface called "OCT" was added. Except for unzip, it has no dependencies. It's still experimental but fast! Feel free to test it and give us a feedback.<br />
Currently it supports reading and writing .xlsx, .ods and .gnumeric files (the latter in yet-to-be-released io-2.2.2).<br />
If <br />
<pre>chk_spreadsheet_support == 0</pre><br />
<br />
it's used automatically (default interface). Otherwise you can force the usage like <br />
<br />
<pre>m = xlsread ('file.xlsx', 1, [], 'OCT');</pre><br />
<br />
Since io package version 2.2.0, the "OCT" interface has experimental write support for .xlsx and .ods formats, since io-2.2.2 (expected mid-May 2014) also for gnumeric. If you can't wait for gnumeric I/O you can checkout a snapshot from svn (see octave.sf.net, http://sourceforge.net/p/octave/code/HEAD/tree/trunk/octave-forge/main/io/)<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Interval_package&diff=11760
Interval package
2019-03-12T23:29:33Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>The GNU Octave interval package for real-valued [https://en.wikipedia.org/wiki/Interval_arithmetic interval arithmetic].<br />
* Intervals are closed, connected subsets of the real numbers. Intervals may be unbound (in either or both directions) or empty. In special cases <code>+inf</code> and <code>-inf</code> are used to denote boundaries of unbound intervals, but any member of the interval is a finite real number.<br />
* Classical functions are extended to interval functions as follows: The result of function f evaluated on interval x is an interval '''enclosure of all possible values''' of f over x where the function is defined. Most interval arithmetic functions in this package manage to produce a very accurate such enclosure.<br />
* The result of an interval arithmetic function is an interval in general. It might happen, that the mathematical range of a function consist of several intervals, but their union will be returned, e. g., 1 / [-1, 1] = [Entire]. <br />
<br />
__TOC__<br />
[[File:Interval-sombrero.png|280px|thumb|left|Example: Plotting the interval enclosure of a function]]<br />
<div style="clear:left"></div><br />
<br />
== Distribution ==<br />
* [https://octave.sourceforge.io/interval/ Latest version at Octave Forge]<br />
** <code>pkg install -forge interval</code><br />
** [https://octave.sourceforge.io/interval/overview.html function reference]<br />
** [https://octave.sourceforge.io/interval/package_doc/index.html package documentation] (user manual)<br />
'''Third-party'''<br />
* [https://tracker.debian.org/pkg/octave-interval Debian GNU/Linux], [https://launchpad.net/ubuntu/+source/octave-interval Launchpad Ubuntu]<br />
* [https://aur.archlinux.org/packages/octave-interval/ archlinux user repository]<br />
* Included in [https://ftp.gnu.org/gnu/octave/windows/ official Windows installer] and installed automatically with Octave (since version 4.0.1)<br />
* [https://github.com/macports/macports-ports/tree/master/math/octave-interval/ MacPorts] for Mac OS X<br />
* [https://www.freshports.org/math/octave-forge-interval/ FreshPorts] for FreeBSD<br />
* [https://cygwin.com/cgi-bin2/package-grep.cgi?grep=octave-interval Cygwin] for Windows<br />
* [https://build.opensuse.org/package/show/science/octave-forge-interval openSUSE build service]<br />
<br />
== Development status ==<br />
* Completeness<br />
** All required functions from [https://standards.ieee.org/findstds/standard/1788-2015.html IEEE Std 1788-2015], IEEE standard for interval arithmetic, are implemented. The standard was approved by IEEE-SA on June 11, 2015. It will remain active for ten years. The standard was approved by ANSI in 2016.<br />
** Also, the minimalistic standard [https://standards.ieee.org/findstds/standard/1788.1-2017.html IEEE Std 1788.1-2017], IEEE standard for interval arithmetic (simplified) is fully implemented. The standard was approved by IEEE-SA on December 6, 2017 (and published in January 2018).<br />
** In addition there are functions for interval matrix arithmetic, N-dimensional interval arrays, plotting, and solvers.<br />
* Quality<br />
** Most arithmetic operations produce tight, correctly-rounded results. That is, the smallest possible interval with double-precision (binary64) endpoints, which encloses the exact result.<br />
** Includes [https://github.com/oheim/ITF1788 large test suite] for arithmetic functions<br />
** For open bugs please refer to the [https://savannah.gnu.org/search/?words=forge+interval&type_of_search=bugs&only_group_id=1925&exact=1 bug tracker].<br />
* Performance<br />
** All elementary functions have been [https://octave.org/doc/interpreter/Vectorization-and-Faster-Code-Execution.html vectorized] and run fast on large input data.<br />
** Arithmetic is performed with the [http://www.mpfr.org/ GNU MPFR] library internally. Where possible, the optimized [http://web.archive.org/web/20170128033523/http://lipforge.ens-lyon.fr/www/crlibm/ CRlibm] library is used.<br />
* Portability<br />
** Runs in GNU Octave ≥ 3.8.2<br />
** Known to run under GNU/Linux, Microsoft Windows, macOS, and FreeBSD<br />
<br />
== Project ideas (TODOs) ==<br />
* To be considered in the future: Algorithms can be migrated from the C-XSC Toolbox (C++ code) from [http://www2.math.uni-wuppertal.de/wrswt/xsc/cxsc_new.html] (nlinsys.cpp and cpzero.cpp), however these would need gradient arithmetic and complex arithmetic.<br />
* Interval version of <code>interp1</code><br />
* Extend <code>subsasgn</code> to allow direct manipulation of inf and sup (and dec) properties.<br />
>> A = infsup ("[2, 4]");<br />
>> A.inf = infsup ("[1, 3]")<br />
A = [1, 4]<br />
>> A.inf = 5<br />
A = [Empty]<br />
:* While at it, also allow multiple subscripts in <code>subsasgn</code><br />
>> A(:)(2:4)(2) = 42; # equivalent to A(3) = 42<br />
>> A.inf(3) = 42; # also A(3).inf = 42<br />
>> A.inf.inf = 42 # should produce error?<br />
>> A.inf.sup = 42 # should produce error?<br />
* Tight Enclosure of Matrix Multiplication with Level 3 BLAS [http://kam.mff.cuni.cz/conferences/swim2015/abstracts/ozaki.pdf] [http://kam.mff.cuni.cz/conferences/swim2015/slides/ozaki.pdf]<br />
* Verified Convex Hull for Inexact Data [http://kam.mff.cuni.cz/conferences/swim2015/abstracts/ohta.pdf] [http://kam.mff.cuni.cz/conferences/swim2015/slides/ohta.pdf]<br />
* Implement user-controllable output from the interval standard (e. g. via printf functions):<br />
a) It should be possible to specify the preferred overall field width (the length of s).<br />
b) It should be possible to specify how Empty, Entire and NaI are output,<br />
e.g., whether lower or upper case, and whether Entire becomes [Entire] or [-Inf, Inf].<br />
c) For l and u, it should be possible to specify the field width,<br />
and the number of digits after the point or the number of significant digits.<br />
(partly this is already implemented by output_precision (...) / `format long` / `format short`)<br />
d) It should be possible to output the bounds of an interval without punctuation,<br />
e.g., 1.234 2.345 instead of [1.234, 2.345]. For instance, this might be a<br />
convenient way to write intervals to a file for use by another application.<br />
<br />
== Compatibility ==<br />
The interval package's main goal is to be compliant with IEEE Std 1788-2015, so it is compatible with other standard-conforming implementations (on the set of operations described by the standard document). Other implementations, which are known to aim for standard conformance are:<br />
<br />
* [https://github.com/JuliaIntervals/IntervalArithmetic.jl IntervalArithmetic.jl package] (Julia)<br />
* [https://github.com/jinterval/jinterval JInterval library] (Java)<br />
* [https://github.com/nadezhin/libieeep1788 ieeep1788 library] (C++) created by Marco Nehmeier, later forked by Dmitry Nadezhin<br />
<br />
=== Octave Forge simp package ===<br />
In 2008/2009 there was a Single Interval Mathematics Package (SIMP) for Octave, which has eventually become unmaintained at Octave Forge.<br />
<br />
The simp package contains a few basic interval arithmetic operations on scalar or vector intervals. It does not consider inaccurate built-in arithmetic functions, round-off, conversion and representational errors. As a result its syntax is very easy, but the arithmetic fails to produce guaranteed enclosures.<br />
<br />
It is recommended to use the interval package as a replacement for simp. However, function names and interval constructors are not compatible between the packages.<br />
<br />
=== INTLAB ===<br />
This interval package is ''not'' meant to be a replacement for INTLAB and any compatibility with it is pure coincidence. Since both are compatible with GNU Octave, they happen to agree on many function names and programs written for INTLAB may possibly run with this interval package as well. Some fundamental differences that I am currently aware of:<br />
* INTLAB is non-free software, it grants none of the [http://www.gnu.org/philosophy/free-sw.html four essential freedoms] of free software<br />
* INTLAB is not conforming to IEEE Std 1788-2015 and the parsing of intervals from strings uses a different format—especially for the uncertain form<br />
* INTLAB supports intervals with complex numbers and sparse interval matrices, but no empty intervals<br />
* INTLAB uses inferior accuracy for most arithmetic operations, because it focuses on speed<br />
* Basic operations can be found in both packages, but the availability of special functions depends<br />
<br />
<br />
<div style="display:flex; align-items: flex-start"><br />
<div style="margin-right: 2em"><br />
{{Code|Computation with this interval package|<syntaxhighlight lang="octave"><br />
pkg load interval<br />
A1 = infsup (2, 3);<br />
B1 = hull (-4, A2);<br />
C1 = midrad (0, 2);<br />
<br />
A1 + B1 * C1<br />
</syntaxhighlight><br />
}}<br />
</div><div><br />
{{Code|Computation with INTLAB|<syntaxhighlight lang="octave"><br />
startintlab<br />
A2 = infsup (2, 3);<br />
B2 = hull (-4, A2);<br />
C2 = midrad (0, 2);<br />
<br />
A2 + B2 * C2<br />
</syntaxhighlight><br />
}}<br />
</div><br />
</div><br />
<br />
==== Known differences ====<br />
Simple programs written for INTLAB should run without modification with this interval package. The following table lists common functions that use a different name in INTLAB.<br />
{|<br />
! interval package<br />
! INTLAB<br />
|-<br />
| infsup (x)<br />
| intval (x)<br />
|-<br />
| wid (x)<br />
| diam (x)<br />
|-<br />
| subset (a, b)<br />
| in (a, b)<br />
|-<br />
| interior (a, b)<br />
| in0 (a, b)<br />
|-<br />
| isempty (x)<br />
| isnan (x)<br />
|-<br />
| disjoint (a, b)<br />
| emptyintersect (a, b)<br />
|-<br />
| hdist (a, b)<br />
| qdist (a, b)<br />
|-<br />
| disp (x)<br />
| disp2str (x)<br />
|-<br />
| infsup (s)<br />
| str2intval (s)<br />
|-<br />
| isa (x, "infsup")<br />
| isintval (x)<br />
|}<br />
<br />
== Developer Information ==<br />
=== Source Code Repository ===<br />
https://sourceforge.net/p/octave/interval/ci/default/tree/<br />
<br />
=== Dependencies ===<br />
apt-get install liboctave-dev mercurial make automake libmpfr-dev<br />
<br />
=== Build ===<br />
The repository contains a Makefile which controls the build process. Some common targets are:<br />
* <code>make release</code> Create a release tarball and the HTML documentation for [[Octave Forge]] (takes a while).<br />
* <code>make check</code> Run the full test-suite to verify that code changes didn't break anything (takes a while).<br />
* <code>make run</code> Quickly start Octave with minimal recompilation and functions loaded from the workspace (for interactive testing of code changes).<br />
<br />
'''Build dependencies'''<br />
<code>apt-get install libmpfr-dev autoconf automake inkscape zopfli</code><br />
<br />
=== Architecture ===<br />
<br />
In a nutshell the package provides two new data types to users: bare intervals and decorated intervals. The data types are implemented as:<br />
* class <code>infsup</code> (bare interval) with attributes <code>inf</code> (lower interval boundary) and <code>sup</code> (upper interval boundary)<br />
* class <code>infsupdec</code> (decorated interval) which extends the former and adds attribute <code>dec</code> (interval decoration).<br />
<br />
Almost all functions in the package are implemented as methods of these classes, e. g. <code>@infsup/sin</code> implements the sine function for bare intervals. Most code is kept in m-files. Arithmetic operations that require correctly-rounded results are implemented in oct-files (C++ code), these are used internally by the m-files of the package. The source code is organized as follows:<br />
<br />
+- doc/ – package manual<br />
+- inst/<br />
| +- @infsup/<br />
| | +- infsup.m – class constructor for bare intervals<br />
| | +- sin.m – sine function for bare intervals (uses mpfr_function_d internally)<br />
| | `- ... – further functions on bare intervals<br />
| +- @infsupdec/<br />
| | +- infsupdec.m – class constructor for decorated intervals<br />
| | +- sin.m – sine function for decorated intervals (uses @infsup/sin internally)<br />
| | `- ... – further functions on decorated intervals<br />
| `- ... – a few global functions that don't operate on intervals<br />
`- src/<br />
+- mpfr_function_d.cc – computes various arithmetic functions correctly rounded (using MPFR)<br />
`- ... – other oct-file sources<br />
<br />
=== Best practices ===<br />
==== Parameter checking ====<br />
* All methods must check <code>nargin</code> and call <code>print_usage</code> if the number of parameters is wrong. This prevents simple errors by the user.<br />
* Methods with more than 1 parameter must convert non-interval parameters to intervals using the class constructor. This allows the user to mix non-interval parameters with interval parameters and the function treats any inputs as intervals. Invalid values will be handled by the class constructors.<br />
if (not (isa (x, "infsup")))<br />
x = infsup (x);<br />
endif<br />
if (not (isa (y, "infsup")))<br />
y = infsup (y);<br />
endif<br />
<br />
if (not (isa (x, "infsupdec")))<br />
x = infsupdec (x);<br />
endif<br />
if (not (isa (y, "infsupdec")))<br />
y = infsupdec (y);<br />
endif<br />
<br />
==== Use of Octave functions ====<br />
Octave functions may be used as long as they don't introduce arithmetic errors. For example, the ceil function can be used safely since it is exact on binary64 numbers.<br />
function x = ceil (x)<br />
... parameter checking ...<br />
x.inf = ceil (x.inf);<br />
x.sup = ceil (x.sup);<br />
endfunction<br />
<br />
If Octave functions would introduce arithmetic/rounding errors, there are interfaces to MPFR (<code>mpfr_function_d</code>) and crlibm (<code>crlibm_function</code>), which can produce guaranteed boundaries.<br />
<br />
==== Vectorization & Indexing ====<br />
All functions should be implemented using vectorization and indexing. This is very important for performance on large data. For example, consider the plus function. It computes lower and upper boundaries of the result (x.inf, y.inf, x.sup, y.sup may be vectors or matrices) and then uses an indexing expression to adjust values where empty intervals would have produces problematic values.<br />
function x = plus (x, y)<br />
... parameter checking ...<br />
l = mpfr_function_d ('plus', -inf, x.inf, y.inf);<br />
u = mpfr_function_d ('plus', +inf, x.sup, y.sup);<br />
<br />
emptyresult = isempty (x) | isempty (y);<br />
l(emptyresult) = inf;<br />
u(emptyresult) = -inf;<br />
…<br />
endfunction<br />
<br />
== VERSOFT ==<br />
The [http://uivtx.cs.cas.cz/~rohn/matlab/ VERSOFT] software package (by Jiří Rohn) has been released under a free software license (Expat license) and algorithms may be migrated into the interval package.<br />
<br />
{|<br />
! Function<br />
! Status<br />
! Information<br />
|-<br />
|colspan="3"|Real (or complex) data only: Matrices<br />
|-<br />
|verbasis<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">verfullcolrank</code><br />
|-<br />
|vercondnum<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">versingval</code><br />
|-<br />
|verdet<br />
|style="color:red"| trapped<br />
| depends on <code>vereig</code><br />
|-<br />
|verdistsing<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">versingval</code><br />
|-<br />
|verfullcolrank<br />
|style="color:red"| trapped<br />
| depends on <code>verpinv</code><br />
|-<br />
|vernorm2<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">versingval</code><br />
|-<br />
|vernull (experimental)<br />
| unknown<br />
| depends on <code style="color:red">verlsq</code>; todo: compare with local function inside <code style="color:green">verintlinineqs</code><br />
|-<br />
|verorth<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">verbasis</code> and <code style="color:red">verthinsvd</code><br />
|-<br />
|verorthproj<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">verpinv</code> and <code style="color:red">verfullcolrank</code><br />
|-<br />
|verpd<br />
|style="color:red"| trapped<br />
| depends on <code>isspd</code> (by Rump, to be checked) and <code style="color:red">vereig</code><br />
|-<br />
|verpinv<br />
|style="color:red"| trapped<br />
| dependency <code>verifylss</code> is implemented as <code>mldivide</code>; depends on <code style="color:red">verthinsvd</code><br />
|-<br />
|verpmat<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">verregsing</code><br />
|-<br />
|verrank<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">versingval</code> and <code style="color:red">verbasis</code><br />
|-<br />
|verrref<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">verfullcolrank</code> and <code style="color:red">verpinv</code><br />
|-<br />
|colspan="3"|Real (or complex) data only: Matrices: Eigenvalues and singular values<br />
|-<br />
|vereig<br />
|style="color:red"| trapped<br />
| depends on proprietary <code>verifyeig</code> function from INTLAB, depends on complex interval arithmetic<br />
|-<br />
|<s>vereigback</s><br />
|style="color:green"| free, migrated (for real eigenvalues)<br />
| dependency <code>norm</code> is already implemented<br />
|-<br />
|verspectrad<br />
|style="color:red"| trapped<br />
| main part implemented in <code>vereig</code><br />
|-<br />
|colspan="3"|Real (or complex) data only: Matrices: Decompositions<br />
|-<br />
|verpoldec<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">verthinsvd</code><br />
|-<br />
|verrankdec<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">verfullcolrank</code> and <code style="color:red">verpinv</code><br />
|-<br />
|verspectdec<br />
|style="color:red"| trapped<br />
| main part implemented in <code>vereig</code><br />
|-<br />
|verthinsvd<br />
|style="color:red"| trapped<br />
| implemented in <code>vereig</code><br />
|-<br />
|colspan="3"|Real (or complex) data only: Matrix functions<br />
|-<br />
|vermatfun<br />
|style="color:red"| trapped<br />
| main part implemented in <code>vereig</code><br />
|-<br />
|colspan="3"|Real data only: Linear systems (rectangular) <br />
|-<br />
|<s>verlinineqnn</s><br />
|style="color:green"| free, migrated<br />
| use <code>glpk</code> as a replacement for <code>linprog</code><br />
|-<br />
|verlinsys<br />
|style="color:red"| trapped<br />
| dependency <code>verifylss</code> is implemented as <code>mldivide</code>; depends on <code style="color:red">verpinv</code>, <code style="color:red">verfullcolrank</code>, and <code style="color:red">verbasis</code><br />
|-<br />
|verlsq<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">verpinv</code> and <code style="color:red">verfullcolrank</code><br />
|-<br />
|colspan="3"|Real data only: Optimization<br />
|-<br />
|verlcpall<br />
|style="color:green"| free<br />
| depends on <code>verabsvaleqnall</code><br />
|-<br />
|<s>verlinprog</s><br />
|style="color:green"| free, migrated<br />
| use <code>glpk</code> as a replacement for <code>linprog</code>; dependency <code>verifylss</code> is implemented as <code>mldivide</code><br />
|-<br />
|verlinprogg<br />
|style="color:red"| trapped<br />
| depends on <code>verfullcolrank</code><br />
|-<br />
|verquadprog<br />
| unknown<br />
| use <code>quadprog</code> from the optim package; use <code>glpk</code> as a replacement for <code>linprog</code>; dependency <code>verifylss</code> is implemented as <code>mldivide</code>; depends on <code>isspd</code> (by Rump, to be checked, algorithm in [http://www.ti3.tuhh.de/paper/rump/Ru06c.pdf])<br />
|-<br />
|colspan="3"|Real (or complex) data only: Polynomials<br />
|-<br />
|verroots<br />
|style="color:red"| trapped<br />
| main part implemented in <code>vereig</code><br />
|-<br />
|colspan="3"|Interval (or real) data: Matrices<br />
|-<br />
|verhurwstab<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">verposdef</code><br />
|-<br />
|verinverse<br />
|style="color:green"| free<br />
| depends on <code style="color:green">verintervalhull</code>, to be migrated<br />
|-<br />
|<s>verinvnonneg</s><br />
|style="color:green"| free, migrated<br />
|-<br />
|verposdef<br />
|style="color:red"| trapped<br />
| depends on <code>isspd</code> (by Rump, to be checked) and <code style="color:red">verregsing</code><br />
|-<br />
|verregsing<br />
|style="color:red"| trapped<br />
| dependency <code>verifylss</code> is implemented as <code>mldivide</code>; depends on <code>isspd</code> (by Rump, to be checked) and <code>verintervalhull</code>; see also [http://uivtx.cs.cas.cz/~rohn/publist/singreg.pdf]<br />
|-<br />
|colspan="3"|Interval (or real) data: Matrices: Eigenvalues and singular values<br />
|-<br />
|vereigsym<br />
|style="color:red"| trapped<br />
| main part implemented in <code>vereig</code>, depends on <code style="color:red">verspectrad</code><br />
|-<br />
|vereigval<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">verregsing</code><br />
|-<br />
|<s>vereigvec</s><br />
|style="color:green"| free, migrated<br />
|-<br />
|verperrvec<br />
|style="color:green"| free<br />
| the function is just a wrapper around <code style="color:green">vereigvec</code>?!?<br />
|-<br />
|versingval<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">vereigsym</code><br />
|-<br />
|colspan="3"|Interval (or real) data: Matrices: Decompositions<br />
|-<br />
|verqr (experimental)<br />
|style="color:green"| free<br />
| <code>qr</code> has already been implemented using the Gram-Schmidt process, which seems to be more accurate and faster than the Cholsky decomposition or Householder reflections used in verqr. No migration needed.<br />
|-<br />
|<s>verchol (experimental)</s><br />
|style="color:green"| free, migrated<br />
| migrated version has been named after the standard Octave function <code>chol</code><br />
|-<br />
|colspan="3"|Interval (or real) data: Linear systems (square)<br />
|-<br />
|verenclinthull<br />
|style="color:green"| free<br />
| to be migrated<br />
|-<br />
|verhullparam<br />
|style="color:green"| free<br />
| depends on <code>verintervalhull</code>, to be migrated<br />
|-<br />
|verhullpatt<br />
|style="color:green"| free<br />
| depends on <code>verhullparam</code>, to be migrated<br />
|-<br />
|verintervalhull<br />
|style="color:green"| free<br />
| to be migrated<br />
|-<br />
|colspan="3"|Interval (or real) data: Linear systems (rectangular)<br />
|-<br />
|verintlinineqs<br />
|style="color:green"| free<br />
| depends on <code style="color:green">verlinineqnn</code><br />
|-<br />
|veroettprag<br />
|style="color:green"| free<br />
|-<br />
|vertolsol<br />
|style="color:green"| free<br />
| depends on <code style="color:green">verlinineqnn</code><br />
|-<br />
|colspan="3"|Interval (or real) data: Matrix equations (rectangular)<br />
|-<br />
|vermatreqn<br />
|style="color:green"| free<br />
|-<br />
|colspan="3"|Real data only: Uncommon problems<br />
|-<br />
| plusminusoneset<br />
|style="color:green"| free<br />
|-<br />
| verabsvaleqn<br />
|style="color:green"| free<br />
| to be migrated<br />
|-<br />
| verabsvaleqnall<br />
|style="color:green"| free<br />
| depends on <code>verabsvaleqn</code>, see also [http://uivtx.cs.cas.cz/~rohn/publist/absvaleqnall.pdf], to be migrated<br />
|-<br />
| verbasintnpprob<br />
|style="color:red"| trapped<br />
| depends on <code style="color:red">verregsing</code><br />
|-<br />
|}<br />
<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Instrument_control_package&diff=11759
Instrument control package
2019-03-12T23:29:04Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>Instrument-Control is a package for interfacing the outside world of hardware via Serial, i2c or Parallel interfaces. It is currently under development by Andrius Sutas and Stefan Mahr, you can browse the [https://sourceforge.net/p/octave/instrument-control/ci/default/tree/ mercurial repository here] and download the package [http://octave.sourceforge.net/instrument-control/index.html here].<br />
<br />
= Compatibility =<br />
<br />
Below is a table showing package compatibility with various platforms:<br />
<br />
{| class="wikitable" style="text-align:center"<br />
|-<br />
! !! Linux !! Windows (Cygwin) !! Windows (native) !! FreeBSD !! Mac OS X <br />
|-<br />
! Serial<br />
| bgcolor="green" | v0.1.0 || bgcolor="green" | v0.2.0 || bgcolor="green" | v0.2.1 || bgcolor="skyblue" | stalled || bgcolor="green" | v0.2.2<br />
|-<br />
! Parallel<br />
| bgcolor="green" | v0.1.0 || - || - || bgcolor="skyblue" | stalled || -<br />
|-<br />
! i2c<br />
| bgcolor="green" | v0.1.0 || - || - || bgcolor="skyblue" | stalled || - <br />
|-<br />
! TCP<br />
| bgcolor="green" | v0.2.0 || bgcolor="green" | v0.2.0 || bgcolor="green" | v0.2.0 || bgcolor="skyblue" | stalled || bgcolor="green" | v0.2.2<br />
|-<br />
! UDP<br />
| bgcolor="green" | v0.3.0 || bgcolor="green" | v0.3.0 || bgcolor="green" | v0.3.0 || - || bgcolor="green" | v0.3.0<br />
|-<br />
! USBTMC<br />
| bgcolor="green" | v0.2.0 || - || - || - || - <br />
|-<br />
! GPIB<br />
| bgcolor="green" | v0.2.0 [[#Linux|(*)]] || bgcolor="green" | v0.2.0 [[#Windows_.28cygwin.29|(*)]] || - ||- || - <br />
|-<br />
! VXI11<br />
| bgcolor="green" | v0.2.0|| bgcolor="green" | v0.2.0 [[#Windows_.28cygwin.29|(*)]] || - || - || bgcolor="yellow" | WIP [[#MacOS|(*)]]<br />
|}<br />
<br />
Where: <span style="background:green">(VER)</span> - Included since VER version; <span style="background:yellow">(WIP)</span> - Work In Progress and will probably be included in next release; <span style="background:skyblue">(stalled)</span> - Some work has been done, but it's not tested and no one is actively contributing; (-) - Not supported / Untested.<br />
<br />
You might see errors while doing "pkg install", which mean that package is unable to support related interface on your platform (e.g. due to missing header files), therefore one should <b>always</b> check for the supported interfaces before trying to use them:<br />
<br />
{{Code|Check for interface support|<syntaxhighlight lang="octave" style="font-size:13px"><br />
pkg load instrument-control<br />
<br />
if (exist("serial") == 3)<br />
disp("Serial: Supported")<br />
else<br />
disp("Serial: Unsupported")<br />
endif<br />
<br />
#similarly with:<br />
#exist("parallel") == 3<br />
#exist("i2c") == 3<br />
</syntaxhighlight>}}<br />
<br />
= Requirements =<br />
== Linux ==<br />
<br />
For GPIB support, please install [http://linux-gpib.sourceforge.net linux-gpib] before installing instrument-control.<br />
<br />
== Windows (cygwin) ==<br />
<br />
For VXI11 support, please install 'rpcgen', 'libtirpc-devel', and 'libtirpc1' before installing instrument-control.<br />
<br />
To be able to use GPIB on windows, the linux-gpib library needs to be 'faked'. This can be done by copying the following script and run it in a bash-terminal.<br />
<br />
<source lang="bash"><br />
#!/bin/bash<br />
# fake_linux_gpib.sh, Kire Pûdsje, Dec 2017<br />
<br />
# This file generates a fake linux-gpib library on Windows, based on the<br />
# installed NI libraries.<br />
# Prerequisits are that during install of the NI drivers, the C/C++ support <br />
# and the NI Measurement & Automation explorer has been enabled.<br />
<br />
# this define should find the NI header file, if properly installled<br />
# otherwise just point it to the proper header file.<br />
NI_H_FILE="${NIEXTCCOMPILERSUPP}/include/ni4882.h"<br />
NI_DLL_FILE=ni4882.dll<br />
NI_DEF_FILE=/tmp/${0##*/}-$$.def<br />
<br />
# symlink NI header file<br />
mkdir -p /usr/include/gpib/<br />
ln -sf "${NI_H_FILE}" /usr/include/gpib/ib.h<br />
<br />
# generate .def for all functions in the NI header file with a NI488CC prefix<br />
echo LIBRARY ${NI_DLL_FILE} > ${NI_DEF_FILE}<br />
echo EXPORTS >> ${NI_DEF_FILE}<br />
grep "NI488CC *[A-Za-z]" /usr/include/gpib/ib.h \<br />
| sed "s/^.*NI488CC *//" \<br />
| sed "s/(.*$//" >> ${NI_DEF_FILE}<br />
<br />
# generate the wrapper library simulating gpib-linux<br />
dlltool -d ${NI_DEF_FILE} -l /usr/lib/libgpib.a<br />
<br />
#cleanup <br />
rm -f ${NI_DEF_FILE}<br />
</source><br />
<br />
== MacOS ==<br />
<br />
You need to build '''rpcgen''' from source [http://mirror.ancl.hawaii.edu/pub/FreeBSD/FreeBSD-current/src/usr.bin/rpcgen].<br />
<br />
If rpcgen cannot be build from source, the following error might be obtained:<br />
<syntaxhighlight style="font-size:13px"><br />
pkg: error running `make' for the instrument-control package.<br />
error: called from<br />
configure_make at line 99 column 9<br />
install at line 184 column 7<br />
pkg at line 437 column 9<br />
</syntaxhighlight><br />
<br />
If the '''VXI-11 interface''' is not required, a workarround is proposed in [https://stackoverflow.com/questions/46720092/make-error-when-installing-instrument-control-package-for-octave/52860282#52860282] after the bug reported on [https://savannah.gnu.org/bugs/?54842].<br />
<br />
= Examples =<br />
== Serial ==<br />
=== Configuring interface ===<br />
You might want to configure interface in a loopback mode for testing.<br />
* If you have a Serial adapter, then simply connect pins 3 (Tx) and 2 (Rx) together (assuming your adapter is [http://en.wikipedia.org/wiki/File:DE9_D-subminiature_RS-232_pinout.png RS-232 DE9], otherwise check before doing anything). One can also insert an LED in series to view the actual bitstream.<br />
* If you do not have a Serial adapter then create a virtual port using:<br />
<pre><br />
$ socat PTY,link=/dev/ttyS15 PTY,link=/dev/ttyS16<br />
</pre><br />
<br />
which will open two interconnected interfaces, where one (e.g. /dev/ttyS15) can be opened in Octave and second (e.g. /dev/ttyS16) using something like GNU screen:<br />
<pre><br />
$ screen /dev/ttyS16 <baudrate><br />
</pre><br />
<br />
do not forget to change interface permissions if you want to use them with Octave/screen without root privileges.<br />
<br />
=== Example: basic use ===<br />
Here is a simple example to get started with the serial package. It tests the RxD and TxD lines. Make sure you have defined a loopback or connected the pins of your adapter.<br />
{{Code|Serial port example|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Opens serial port ttyUSB1 with baudrate of 115200 (config defaults to 8-N-1)<br />
s1 = serial("/dev/ttyUSB1", 115200) <br />
# Flush input and output buffers<br />
srl_flush(s1); <br />
# Blocking write call, currently only accepts strings<br />
srl_write(s1, "Hello world!") <br />
# Blocking read call, returns uint8 array of exactly 12 bytes read<br />
data = srl_read(s1, 12) <br />
# Convert uint8 array to string, <br />
char(data) <br />
</syntaxhighlight><br />
}}<br />
<br />
Changing some configurations is simply done by calling helper functions<br />
{{Code|Serial port example: helper functions|<syntaxhighlight lang="octave" style="font-size:13px"><br />
set(s1, "baudrate", 9600) # Change baudrate<br />
set(s1, "bytesize", 5) # Change byte size (config becomes 5-N-1)<br />
set(s1, "parity", "E") # Changes parity checking (config becomes 5-E-1),<br />
# possible values [E]ven, [O]dd, [N]one.<br />
set(s1, "stopbits", 2) # Changes stop bits (config becomes 5-E-2), possible<br />
# values 1, 2.<br />
<br />
set(s1, "dataterminalready", "on") # Enables DTR line<br />
set(s1, "requesttosend", "on") # Enables RTS line<br />
# possible values "on", "off". <br />
<br />
</syntaxhighlight><br />
}}<br />
Some properties can be set at opening time<br />
{{Code|Serial port example: constructor call|<syntaxhighlight lang="octave" style="font-size:13px"><br />
s2 = serial("/dev/ttyS0", 9600, 10) # Opens serial port ttyS0 in<br />
# 9600 baudrate with 1s read timeout<br />
</syntaxhighlight><br />
}}<br />
<br />
Do not forget to close the ports when you are done!<br />
{{Code||<syntaxhighlight lang="octave" style="font-size:13px"><br />
fclose(s1) # Closes and releases serial interface object<br />
fclose(s2) # Closes and releases serial interface object<br />
</syntaxhighlight><br />
}}<br />
<br />
=== Example: Windows, serial port >COM9 ===<br />
Opening a serial port higher than COM9 requires special syntax. [https://support.microsoft.com/en-us/kb/115831]<br />
{{Code|open Windows higher serial port example|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Opens serial port COM10<br />
s1 = serial("\\\\.\\COM10");<br />
</syntaxhighlight><br />
}}<br />
<br />
== Parallel ==<br />
=== Configuring interface ===<br />
You will need to load following modules:<br />
<pre><br />
# modprobe parport<br />
# modprobe ppdev<br />
</pre><br />
<br />
Now you should see devices like "/dev/parport0". In case you do not, you will need to create them manually and give sufficient privileges for your user:<br />
<br />
<pre><br />
# mknod /dev/parport0 c 99 0 -m 666<br />
</pre><br />
<br />
=== Example 1: LED trace ===<br />
For this example you will need to connect 8 LEDs to Parallel interface Data port as shown below:<br />
<br />
[[File:parport_schematic.png|300px|text-bottom]]<br />
<br />
And then the actual script:<br />
{{Code|trace.m|<syntaxhighlight lang="octave" style="font-size:13px"><br />
delay = 0.1;<br />
<br />
pp = parallel("/dev/parport0", 0);<br />
pp_data(pp, 0);<br />
<br />
pins = pow2([0, 1, 2, 3, 4, 5, 6, 7]);<br />
<br />
while 1<br />
for p = pins<br />
pp_data(pp, p);<br />
sleep(delay);<br />
endfor <br />
<br />
# Reverse the order<br />
pins = pins(end:-1:1);<br />
endwhile<br />
<br />
pp_close(pp);<br />
</syntaxhighlight>}}<br />
<br />
Run it and you should see LEDs "tracing" forwards and backwards.<br />
<br />
<br />
=== Example 2: LED dimming a.k.a. PWM control ===<br />
Use the same schematic as in Example 1.<br />
<br />
{{Code|dim.m|<syntaxhighlight lang="octave" style="font-size:13px"><br />
delay = 0.00005;<br />
<br />
pp = parallel("/dev/parport0", 0);<br />
pp_data(pp, 0);<br />
<br />
dRange = 0:100;<br />
while 1<br />
for duty = dRange<br />
pp_data(pp, 255); <br />
<br />
for dOn = 0:duty<br />
sleep(delay);<br />
endfor <br />
<br />
pp_data(pp, 0);<br />
<br />
for dOff = 0:(100-duty)<br />
sleep(delay);<br />
endfor<br />
endfor<br />
<br />
# Reverse order<br />
dRange = dRange(end:-1:1);<br />
endwhile<br />
<br />
pp_close(pp);<br />
</syntaxhighlight>}}<br />
<br />
Run it and you should see LEDs changing brightness from lowest to maximum.<br />
<br />
<br />
=== Example 3: Logic analyzer ===<br />
We can surely make something more interesting, right? Enter basic logic analyzer.<br />
<br />
Assume you are working with [[http://datasheets.maximintegrated.com/en/ds/MAX31855.pdf this]] temperature sensor. Something is not right. You do not have one of those expensive logic analyzers, but you do have a Parallel port! You remember that someone made a package for interfacing it with GNU Octave. So you connect your probes to appropriate Data port terminals and change settings accordingly. In this example: <br />
{| class="wikitable"<br />
|-<br />
! Probe !! Port terminal<br />
|-<br />
| !CS || DATA0<br />
|-<br />
| SCK || DATA1<br />
|-<br />
| SO || DATA2<br />
|}<br />
NB: Parallel ports usually have weak pull-ups to +5V even when in "input" mode, so do not do this if unsure.<br />
One could potentially use different terminals in Control/Status ports to get true high-impedance inputs.<br />
<br />
And write a simple script below:<br />
<br />
{{Code|logic_analyzer.m|<syntaxhighlight lang="octave" style="font-size:13px"><br />
#####################################################################<br />
# Settings<br />
#####################################################################<br />
<br />
# Channels to capture<br />
#channels = [0, 1, 2, 3, 4, 5, 6, 7];<br />
channels = [2, 1, 0];<br />
<br />
# Channel labels<br />
#channel = {"CH0"; "CH1"; "CH2"; "CH3"; "CH4"; "CH5"; "CH6"; "CH7"};<br />
channel = {"SO"; "SCK"; "!CS"};<br />
<br />
# Trigger channel<br />
triggerCh = 0;<br />
<br />
# When to trigger<br />
trigger = 0; # Capture on low. For high - 1<br />
<br />
#####################################################################<br />
<br />
samplesTime = [];<br />
samplesValue = [];<br />
<br />
#pp_close(pp);<br />
pp = parallel("/dev/parport0", 1);<br />
<br />
printf("Waiting for trigger...\n");<br />
fflush(stdout);<br />
<br />
data = pp_data(pp);<br />
while (bitget(data, triggerCh + 1) != trigger)<br />
oldData = data;<br />
data = pp_data(pp);<br />
endwhile<br />
<br />
printf("Capturing...\n");<br />
fflush(stdout);<br />
<br />
startTime = time();<br />
samplesTime(end + 1) = 0;<br />
samplesValue(end + 1) = oldData;<br />
<br />
while (bitget(data, triggerCh + 1) == trigger)<br />
data = pp_data(pp);<br />
samplesTime(end + 1) = time() - startTime;<br />
samplesValue(end + 1) = data;<br />
endwhile<br />
<br />
# Statistics<br />
printf("Average sample rate: %f kHz\n", size(samplesValue)(2) / samplesTime(end) / 1000.0);<br />
<br />
pp_close(pp);<br />
<br />
# Plotting<br />
<br />
figure;<br />
for p = 1:size(channels)(2)<br />
subplot (size(channels)(2), 1, p)<br />
plot(samplesTime, bitget(samplesValue, channels(p) + 1))<br />
<br />
ylabel(channel{p});<br />
axis([-0.01, samplesTime(end)+ 0.01, -1, 2], "manual");<br />
set(gca(), 'ytick', -1:2);<br />
set(gca(), 'yticklabel', {''; '0'; '1'; ''});<br />
endfor<br />
xlabel ("t");<br />
</syntaxhighlight>}}<br />
<br />
If connections and settings are correct you should see something like this:<br />
<br />
[[File:logic_analyzer.png|600px|text-bottom]]<br />
<br />
Now you can fully debug what is going with your hardware from comfort of GNU Octave.<br />
<br />
== i2c ==<br />
i2c<br />
<br />
== TCP ==<br />
=== Example: basic use ===<br />
For testing you could start a tcp listener<br />
<pre><br />
$ socat TCP-LISTEN:8000 -<br />
</pre><br />
<br />
Now you can connect your listener.<br />
<br />
{{Code|TCP example|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Open TCP connection to 127.0.0.1:8000<br />
t0 = tcp("127.0.0.1",8000)<br />
# write to listener<br />
tcp_write(t0, "Hello world!") <br />
# Blocking read call, returns uint8 array of exactly 12 bytes read<br />
data = tcp_read(t0, 12) <br />
# Convert uint8 array to string, <br />
char(data) <br />
</syntaxhighlight><br />
}}<br />
There are several ways to set timeout of read call.<br />
{{Code|set TCP timeout|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Open TCP connection to 127.0.0.1:8000 with timeout of 100 ms<br />
t0 = tcp("127.0.0.1",8000,100)<br />
# set timeout to blocking<br />
tcp_timeout(t0, -1) <br />
# the timeout can be overwritten for single read call, in this case 1000ms<br />
data = tcp_read(t0, 12, 1000) <br />
# close tcp session<br />
tcp_close(t0)<br />
</syntaxhighlight><br />
}}<br />
<br />
== USBTMC ==<br />
=== Configuring interface ===<br />
Recent linux kernels support USBTMC out of the box. Connect your instrument and check if /dev/usbtmc* exists. Set appropriate permissions to /dev/usbtmc*<br />
=== Example: basic use ===<br />
{{Code|USBTMC example|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Open interface to USB instrument<br />
t0 = usbtmc('/dev/usbtmc0')<br />
# write to listener<br />
usbtmc_write(t0, '*IDN?') <br />
# Blocking read call, returns uint8 array<br />
data = usbtmc_read(t0, 10000) <br />
# Convert uint8 array to string, <br />
char(data) <br />
# close usbtmc session<br />
usbtmc_close(t0)<br />
</syntaxhighlight><br />
}}<br />
<br />
== VXI11 ==<br />
=== Example: basic use ===<br />
{{Code|VXI11 example|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Open VXI11 connection to 192.168.100.100<br />
t0 = vxi11('192.168.100.100')<br />
# write to listener<br />
vxi11_write(t0, '*IDN?') <br />
# read from instrument, returns uint8 array<br />
data = vxi11_read(t0, 10000) <br />
# Convert uint8 array to string, <br />
char(data) <br />
# close usbtmc session<br />
vxi11_close(t0)<br />
</syntaxhighlight><br />
}}<br />
=== Limitations ===<br />
For now,<br />
* it's not possible to connect more than one instrument per IP address (e.g. VXI11-GPIB gateways)<br />
* only instrument ''inst0'' can be connected<br />
* setting timeout is not implemented (defaults: 10 seconds global timeout, 2 seconds read timeout)<br />
<br />
== GPIB ==<br />
=== Configuring interface ===<br />
For using GPIB you need to install and configure the linux-gpib kernel modules and libraries.<br />
=== Example: basic use ===<br />
{{Code|GPIB example|<syntaxhighlight lang="octave" style="font-size:13px"><br />
# Open GPIB instrument with ID 7 and set timeout to 1 second (see ibtmo / NI-488.2 Function Reference)<br />
t0 = gpib(7,11)<br />
# write to listener<br />
gpib_write(t0, '*IDN?') <br />
# read from instrument, returns uint8 array<br />
data = gpib_read(t0, 10000)<br />
# Convert uint8 array to string, <br />
char(data) <br />
# close usbtmc session<br />
gpib_close(t0)<br />
</syntaxhighlight><br />
}}<br />
=== Limitations ===<br />
* Setting minor, sad, send_eoi and eos_mode is not implemented yet.<br />
* Every read or write command opens and closes a new gpib session, since the linux-gpib session pointer is only valid for single command.<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_acquisition_package&diff=11758
Image acquisition package
2019-03-12T23:28:29Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>The {{Forge|image-acquisition}} package is part of the [[Octave Forge]] project.<br />
<br />
Build dependencies for Debian GNU/Linux are '''libv4l-dev''' and '''libfltk1.3-dev''' or '''libfltk1.1-dev'''. You can install it on GNU/Linux in octave with<br />
octave> pkg install -forge image-acquisition<br />
<br />
If you see complains about a missing mkoctfile: [[FAQ#I_cannot_install_a_package._Octave_complains_about_a_missing_mkoctfile.]]<br />
<br />
If you want to report a bug: [[Image_acquisition_package#Reporting_bugs]]<br />
<br />
'''image-acquisition will not work on Windows as far as there is not port of v4l2 (standing for ''Video for Linux 2'')'''<br />
<br />
== Example session ==<br />
<br />
Lines starting with "octave:>" are executed on the octave prompt.<br />
<br />
=== Load the package and list available hardware ===<br />
<br />
octave:> pkg load image-acquisition<br />
octave:> imaqhwinfo<br />
ans =<br />
scalar structure containing the fields:<br />
driver = uvcvideo<br />
card = UVC Camera (046d:0825)<br />
bus_info = usb-0000:00:12.2-4<br />
version = 3.16.7<br />
capabilities = 2.2314e+09<br />
device = /dev/video0<br />
<br />
=== Open the v4l2 device and output the result ===<br />
<br />
octave:> obj = videoinput("v4l2", "/dev/video0")<br />
obj = videoinput for v4l2<br />
device = /dev/video0<br />
driver = uvcvideo<br />
card = UVC Camera (046d:0825)<br />
VideoInput = 0<br />
VideoResolution = 320 x 240 px<br />
VideoFormat = YUYV<br />
<br />
=== Query which properties are available for the used device ===<br />
<br />
The first 8 ones, starting with an upper letter are fixed, the other specific to the used v4l2 device.<br />
octave:> get(obj)<br />
ans = <br />
{<br />
[1,1] = SelectedSourceName<br />
[2,1] = ReturnedColorSpace<br />
[3,1] = BayerSensorAlignment<br />
[4,1] = DeviceCapabilities<br />
[5,1] = VideoInput<br />
[6,1] = VideoResolution<br />
[7,1] = VideoFrameInterval<br />
[8,1] = VideoFormat<br />
[9,1] = brightness<br />
[10,1] = contrast<br />
[11,1] = saturation<br />
[12,1] = white_balance_temperature_auto<br />
[13,1] = gain<br />
[14,1] = power_line_frequency<br />
[15,1] = white_balance_temperature<br />
[16,1] = sharpness<br />
[17,1] = backlight_compensation<br />
[18,1] = exposure_auto<br />
[19,1] = exposure_absolute<br />
[20,1] = exposure_auto_priority<br />
}<br />
<br />
=== Set VideoFormat to RGB3 aka RGB24 ===<br />
<br />
octave:> set(obj, "VideoFormat", "RGB3");<br />
<br />
=== List available video resolutions ===<br />
<br />
octave:> set(obj, "VideoResolution")<br />
ans =<br />
<br />
640 480<br />
160 120<br />
176 144<br />
320 176<br />
320 240<br />
352 288<br />
432 240<br />
544 288<br />
640 360<br />
752 416<br />
800 448<br />
800 600<br />
864 480<br />
960 544<br />
960 720<br />
1024 576<br />
1184 656<br />
1280 720<br />
1280 960<br />
<br />
=== Set the video resolution to 320x240px ===<br />
<br />
octave:> set(obj, "VideoResolution", [320 240])<br />
<br />
=== Get the current brightness value ===<br />
<br />
octave:> get(obj, "brightness")<br />
ans = 100<br />
<br />
=== Query possible range for brightness ===<br />
<br />
octave:> set(obj, "brightness")<br />
ans =<br />
<br />
scalar structure containing the fields:<br />
<br />
min = 0<br />
max = 255<br />
step = 1<br />
default = 128<br />
<br />
=== Set a new value for brightness ===<br />
<br />
octave:> set(obj, "brightness", 100)<br />
<br />
=== Start preview ===<br />
<br />
octave:> preview(obj)<br />
<br />
Close it with CTRL+C or with [X] on the preview window<br />
<br />
=== Use higher resolution and start streaming with 2 buffers ===<br />
<br />
octave:> set(obj, "VideoResolution", [640 480]);<br />
octave:> start(obj, 2)<br />
<br />
=== Get an image from the buffers, view and save it ===<br />
<br />
octave:> img = getsnapshot(obj);<br />
octave:> image(img)<br />
octave:> imwrite(img, "ex1_a.png")<br />
<br />
octave:> [img, seq, t] = getsnapshot(obj);<br />
octave:> seq<br />
seq = 1<br />
octave:> t<br />
t =<br />
<br />
scalar structure containing the fields:<br />
<br />
tv_sec = 10281<br />
tv_usec = 779303<br />
<br />
=== Stop streaming ===<br />
<br />
octave:> stop(obj)<br />
<br />
== Using v4l2loopback for tests ==<br />
If you don't have a v4l2 device but want to test the package you could create a loopback device:<br />
modprobe v4l2loopback<br />
gst-launch-0.10 videotestsrc ! v4l2sink device=/dev/video0<br />
<br />
== Reporting bugs ==<br />
<br />
Please install v4l2-ctl (for example from Debian package v4l-utils),<br />
run the following commands and attach the output.<br />
<br />
$ v4l2-ctl -w --list-devices<br />
$ v4l2-ctl -w -D<br />
$ v4l2-ctl -w -L<br />
$ v4l2-ctl -w -n<br />
$ v4l2-ctl -w --list-formats<br />
<br />
Enable libv4l2 logging:<br />
$ export LIBV4L2_LOG_FILENAME=libv4l2_debug.log<br />
<br />
Start octave and execute your commands/scripts which show the problem.<br />
<br />
Please include the whole octave session beginning with the start of octave.<br />
There might be some warnings like "warning: function xyz shadows a built-in function" at start.<br />
<br />
Exit octave and add libv4l2_debug.log to your bug report. The logfile libv4l2_debug.log is overwritten between open/close so you have to rename it if you run different scripts.<br />
<br />
Consider running the included tests:<br />
<br />
octave> test @videoinput/videoinput<br />
octave> test @videoinput/get<br />
octave> test @videoinput/set<br />
octave> test @videoinput/getsnapshot<br />
<br />
Run the compliance check (perhaps also with -s)<br />
<br />
v4l2-compliance -d /dev/video0<br />
<br />
== Build source from mercurial repository ==<br />
<br />
'''Warning: You really should use the <pkg install -forge> method described above if you are not sure what you are doing here.'''<br />
<br />
Get the source and build it yourself. The build dependencies for Debian GNU/Linux jessie are '''libv4l-dev''' and '''libfltk1.3-dev''' or '''libfltk1.1-dev'''. You also need the GNU autotools to generate the configure script.<br />
<br />
$ hg clone http://hg.code.sf.net/p/octave/image-acquisition octave-image-acquisition<br />
$ cd octave-image-acquisition/<br />
$ make install<br />
<br />
== make check ==<br />
<br />
If you have cloned the hg repo you can also run the test scripts to see if all works.<br />
<br />
$ cd octave-image-acquisition/devel<br />
$ make check<br />
<br />
octave -q run_tests.m<br />
../src/__v4l2_handler__.cc........................ PASS 3/3<br />
@videoinput/videoinput............................ PASS 1/1<br />
@videoinput/get................................... PASS 4/4<br />
@videoinput/set................................... PASS 7/7<br />
@videoinput/getsnapshot........................... PASS 4/4<br />
imaqhwinfo........................................ PASS 1/1<br />
<br />
Summary:<br />
PASS 20<br />
FAIL 0<br />
<br />
If there are tests which FAIL, then please have a look at the generated fntest.log and add it to your bug report.<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=11757
Image package
2019-03-12T23:27:58Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>The {{Forge|image|image package}} is part of the Octave Forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
<div class="tocinline">__TOC__</div><br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwtraceboundary<br />
* bwulterode<br />
* chromadapt<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* imbinarize<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* [https://savannah.gnu.org/patch/?9717 imapplymatrix]<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* [https://savannah.gnu.org/patch/?9606 integralImage]<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || In Progress<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52959}} || [octave forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|55059}} || [octave forge] (image) Failing unit test for grayslice || In Progress<br />
|-<br />
| {{bug|55202}} || [octave forge] (image) imresize fails for method nearest and image of 1 row || Confirmed<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: [octave forge] (image) multithresh<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9606}}: [Octave forge] (image) New function integralImage<br />
* {{patch|9717}}: [octave forge] (image) new function imapplymatrix<br />
* {{patch|9722}}: [octave forge] (image) new objects imref2d and imref3d<br />
* {{patch|9729}}: [octave forge] (image) -- rgb2xyz conversion with adapted whitepoint<br />
* {{patch|9730}}: [octave forge] (image) new function imfuse<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || function is in Octave core || {{bug|53654}} || || Octave version 4.4.0 and above<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| colorangle || 2.10.0 (unreleased) || || || <br />
|-<br />
| lab2double || 2.6.0 || || || <br />
|-<br />
| lab2rgb || 2.6.0 || || || <br />
|-<br />
| lab2uint16 || 2.6.0 || || || <br />
|-<br />
| lab2uint8 || 2.6.0 || || || <br />
|-<br />
| lab2xyz || 2.6.0 || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || 2.8.0 || || || <br />
|-<br />
| rgb2lab || 2.6.0 || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || 2.8.0 || || || <br />
|-<br />
| rgb2xyz || 2.6.0 || || || <br />
|-<br />
| rgb2ycbcr || < 1.0.0|| || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || 2.6.0 || || || <br />
|-<br />
| xyz2rgb || 2.6.0 || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || 2.2.0|| || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || 2.2.0 || || ||<br />
|-<br />
| imnoise || 2.2.2 || || ||<br />
|-<br />
| phantom || 2.6.2 || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || {{patch|9606}} || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || || ||<br />
|- <br />
| wiener2 || 2.8.0|| || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || {{patch|9717}} || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || 2.8.0 || || ||<br />
|- <br />
| imextendedmin || 2.8.0 || || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || 2.8.0 || || ||<br />
|- <br />
| imhmin || 2.8.0 || || ||<br />
|- <br />
| imimposemin || 2.8.0 || || ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Image Transforms ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| dct2 || || || ||<br />
|-<br />
| dctmtx || || || ||<br />
|-<br />
| fanbeam || || || ||<br />
|-<br />
| fan2para || || || ||<br />
|-<br />
| fftshift|| || || ||<br />
|-<br />
| fft2 || || || ||<br />
|-<br />
| hough || || || ||<br />
|-<br />
| houghlines || || || ||<br />
|-<br />
| houghpeaks || || || ||<br />
|-<br />
|idct2 || || || ||<br />
|-<br />
|ifftshift|| || || ||<br />
|-<br />
|ifft2|| || || ||<br />
|-<br />
|iradon|| || || ||<br />
|- <br />
|para2fan|| || || ||<br />
|-<br />
|radon|| || || ||<br />
|-<br />
|}<br />
<br />
=== Graphical Interface Interaction === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| imellipse || - || || ||<br />
|- <br />
| imfreehand || - || || ||<br />
|-<br />
| imline || - || || ||<br />
|-<br />
| immagbox || - || || ||<br />
|-<br />
| imoverview || - || || ||<br />
|-<br />
| imoverviewpanel || - || || ||<br />
|-<br />
| impixelinfo || - || {{patch|8722}} || ||<br />
|-<br />
| impixelinfoval || - || {{patch|8722}} || ||<br />
|-<br />
| impixelregion || - || || ||<br />
|-<br />
| impixelregionpanel || - || || ||<br />
|-<br />
| implay || - || || ||<br />
|-<br />
| impoint || - || || ||<br />
|-<br />
| impoly || - || || ||<br />
|-<br />
| imrect || - || || ||<br />
|-<br />
| imscrollpanel || - || || ||<br />
|-<br />
| iptgetpref || - || || ||<br />
|-<br />
| iptprefs || - || || ||<br />
|-<br />
| iptsetpref || - || || ||<br />
|-<br />
|}<br />
* Obs: implay, iptgetpref, iptprefs, iptsetpref functions are on Basic Display section too...<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Geometry_package&diff=11756
Geometry package
2019-03-12T23:27:37Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>The geometry package is multipackage providing functions to manipulate geometrical entities in 2D and 3D. It is based in [http://sourceforge.net/apps/mediawiki/matgeom/index.php?title=Main_Page matGeom] and extends it with several other functionalities, e.g. the package provides interfaces with SVG files and polygon meshing using Gmsh.<br />
<br />
== Relation to matGeom ==<br />
<br />
== octCLIP ==<br />
<br />
== Piece-wise 2D polynomial polygons ==<br />
<br />
== Tutorials ==<br />
=== Loading SVG files ===<br />
'''<span style="color:#FF0000;">Coming soon</span>'''<br />
=== Meshing Octave ===<br />
<!--'''<span style="color:#FF0000;">Under construction</span>''' --><br />
<br />
This tutorial shows the workflow to generate a triangular mesh inside an arbitrary region.<br />
This tutorial requires that you install the package {{Forge|fpl}} and {{Forge|msh}} (which requires [http://geuz.org/gmsh/ Gmsh] installed in your system). Alternatively, the core function {{Codeline|delaunay}} could be used but the result aren't so pretty.<br />
<br />
This tutorial requires an interesting shape to mesh. If you have [http://inkscape.org/index.php?lang=en Inkscape] you can create one, and use the previous tutorial to load it into octave. Here I will be using [http://ubuntuone.com/5pNS12ZChUXeGNBniWNa3J this SVG]. <br />
[[File:octave.png|200px|center]]<br />
<br />
<!-- {{SyntaxHighlight| --><br />
{{Code|Loading the file as polygon compatible with geometry package|<syntaxhighlight lang="octave" style="font-size:13px"><br />
octavesvg = svg ("octave.svg").normalize();<br />
ids = octavesvg.pathid();<br />
P = octavesvg.path2polygon (ids{1}, 12)(1:end-1,:);<br />
P = bsxfun (@minus, P, centroid (P));<br />
</syntaxhighlight>}}<br />
<br />
Now we have our SVG as a polygon compatible with the Geometry package format. You can plot the polygon using the function {{Codeline|drawPolygon}}. <br />
{{Code|Plotting a polygon compatible with geometry package|<syntaxhighlight lang="matlab" style="font-size:13px"><br />
drawPolygon (P, "-o");<br />
</syntaxhighlight>}}<br />
As you can see the polygon has lots of points. We need to simplify the polygon in order to obtain a mesh of reasonable size. Otherwise gmsh will have problems meshing and the result could be huge (or a segmentation fault :( ). The package geometry (> 1.5.0) comes with a simplification function that uses the [http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm Ramer-Douglas-Peucker algorithm] to reduce thenumber of points in the polygon.<br />
{{Code|Symplification of a polygon compatible with geometry package|<syntaxhighlight lang="octave" style="font-size:13px"><br />
P = simplifypolygon(P, 'tol', 1e-3); <br />
</syntaxhighlight>}}<br />
You should play with the tolerance option until you get a nice polygon.<br />
<br />
The next step is to mesh the interior of the polygon. To do this we could just call {{Codeline|delaunay}} on the polygon and be done with it, but in general such mesh wont be so nice (you will need to add interior points). A very effective way of generating a good mesh is to use the package {{Forge|msh}}, which requires [http://geuz.org/gmsh/ Gmsh] installed in your system. The function {{Codeline|data2geo}} in the Geometry package makes our work very easy:<br />
<br />
{{Code|Generating mesh for plot with msh package|<syntaxhighlight lang="octave" style="font-size:13px"><br />
pkg load msh<br />
filename = tmpnam ();<br />
meshsize = sqrt (mean (sumsq (diff (P, 1, 1), 2)))/2;<br />
data2geo (P, meshsize, "output", [filename ".geo"]);<br />
T = msh2m_gmsh (filename);<br />
</syntaxhighlight>}}<br />
<br />
<!-- </syntaxhighlight> --><br />
After this code finishes, the structure T contains our mesh. To plot the generated mesh we use the function {{Codeline|pdemesh}} from the {{Forge|fpl}} package. In general is a good idea to use the openGL render (called ''fltk'') to plot meshes.<br />
<br />
{{Code|Plotting mesh with fpl package|<syntaxhighlight lang="octave" style="font-size:13px"><br />
pkg load fpl <br />
graphics_toolkit ('fltk')<br />
pdemesh (T.p, T.e, T.t);<br />
view (2)<br />
axis tight<br />
axis equal<br />
</syntaxhighlight>}}<br />
<br />
The output should look something like this<br />
[[File:octave_meshed.png|400px|center]]<br />
<br />
Questions? Ideas? Join us in the mailing list or in the #octave IRC channel.<br />
<br />
=== From piece-wise polynomial shapes to polygons ===<br />
<br />
== See also ==<br />
* {{Forge|geometry}} at [[Octave Forge]]<br />
* [http://sourceforge.net/apps/mediawiki/matgeom/index.php?title=Main_Page matGeom]<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Fem-fenics&diff=11755
Fem-fenics
2019-03-12T23:27:16Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>Package for solving Partial Differential Equations based on Fenics.<br />
<br />
== Introduction ==<br />
'''Fem-Fenics''' is a package for solving partial differential equations. Obviously, Fem-fenics is not the only extra package for Octave with this purpose. For example, [[Bim_package]] uses finite volumes to solve diffusion-advection-reaction equations, while secs1d/2d/3d [http://octave.sourceforge.net/secs1d/index.html] are suited for the resolution of the drift-diffusion system. Furthermore, to use profitably the software, you can integrate it with msh [http://octave.sourceforge.net/msh/index.html] for the generation of the mesh and with fpl [http://octave.sourceforge.net/fpl/index.html] for the post-processing of data. The objective of Fem-fenics is to be a '''generic library of finite elements''', thereby allowing the user to resolve any type of pde, choosing also the most appropriate Finite Element space for any specific problem.<br />
<br />
As the name suggests, the Fem-fenics pkg is a wrapper for FEniCS [http://fenicsproject.org/] functions and classes. Thus, ideally the Fem-fenics final goal would be to be able to reproduce all the features available in FEniCS, '''simplifying''' them where it is possible or using the '''Octave function''' whenever available (like the "\" for the resolution of a linear system or the odepkg [http://octave.sourceforge.net/odepkg/index.html] for the resolution of a time dependent problem).<br />
<br />
== Tutorials ==<br />
<br />
The solution of a problem can be logically divided in two steps. According to convenience or personal preference, they can be addressed with different files or just in one Octave script:<br />
<br />
* the description of the '''abstract problem''': this should be done via the Unified Form Language ('''UFL'''), which is ''a domain specific language for defining discrete variational forms and functionals in a notation '''close to pen-and-paper formulation'''.'' UFL is easy to learn, and in any case the User manual provides explanations and examples. [http://fenicsproject.org/documentation/ufl/1.2.0/user/user_manual.html#ufl-user-manual] As mentioned before, the problem can be defined in a separate .ufl file or handled directly in an m-file using ufl blocks.<br />
* the implementation of a '''specific problem''', an instance of the abstract one: this is done in a script file ('''.m''') where the fem-fenics functions are used and the problem is solved. Their '''syntax is as close as possible to the python interface''', so that Fenics users should be comfortable with it, but it is also quite intuitive for beginners. The examples below show the equivalence between the different programming languages.<br />
<br />
<br />
=== Poisson Equation ===<br />
Here is a first example for the solution of the Poisson equation. <br />
The equation being solved is<br />
<br />
<math>-\mathrm{div}\ ( \nabla u(x, y) ) ) = 1 \qquad \mbox{ in } \Omega</math><br />
<br />
<math>u(x, y) = 0 \qquad \mbox{ on } \Gamma_D</math><br />
<br />
<math>(\nabla u(x, y) ) \cdot \mathbf{n} = 0 \qquad \mbox{ on } \Gamma_N</math><br />
<br />
A complete description of the problem is avilable on the [http://fenicsproject.org/documentation/dolfin/1.2.0/python/demo/pde/poisson/python/documentation.html Fenics website.]<br />
<br />
<br />
[[File:Fem-fenics_poisson.png|Location=center]]<br />
<br />
<div style="width: 100%;"><br />
<div style="float:left; width: 48%"><br />
{{Code|Define Poisson problem with fem-fenics|<syntaxhighlight lang="octave" style="font-size:13px"> <br />
pkg load fem-fenics msh<br />
<br />
ufl start Poisson<br />
ufl element = FiniteElement("Lagrange", triangle, 1)<br />
ufl<br />
ufl u = TrialFunction(element)<br />
ufl v = TestFunction(element)<br />
ufl f = Coefficient(element)<br />
ufl g = Coefficient(element)<br />
ufl<br />
ufl a = inner(grad(u), grad(v))*dx<br />
ufl L = f*v*dx + g*v*ds<br />
ufl end<br />
<br />
# Create mesh and define function space<br />
x = y = linspace (0, 1, 33);<br />
mesh = Mesh(msh2m_structured_mesh (x, y, 1, 1:4));<br />
<br />
V = FunctionSpace('Poisson', mesh);<br />
<br />
<br />
<br />
<br />
<br />
# Define boundary condition<br />
<br />
bc = DirichletBC(V, @(x, y) 0.0, [2;4]);<br />
<br />
# Define variational problem<br />
# Operation performed in the ufl snippet above<br />
# u = TrialFunction(element)<br />
# v = TestFunction(element)<br />
# f = Coefficient(element)<br />
# g = Coefficient(element)<br />
<br />
f = Expression ('f', <br />
@(x,y) 10*exp(-((x - 0.5)^2 + (y - 0.5)^2) / 0.02));<br />
g = Expression ('g', @(x,y) sin (5.0 * x));<br />
<br />
# As in the ufl snippet above<br />
# a = inner(grad(u), grad(v))*dx<br />
# L = f*v*dx + g*v*ds<br />
<br />
a = BilinearForm ('Poisson', V, V);<br />
L = LinearForm ('Poisson', V, f, g);<br />
<br />
# Compute solution<br />
<br />
[A, b] = assemble_system (a, L, bc);<br />
sol = A \ b;<br />
u = Function ('u', V, sol);<br />
<br />
# Save solution in VTK format<br />
<br />
save (u, 'poisson')<br />
<br />
# Plot solution<br />
plot (u);<br />
<br />
</syntaxhighlight>}}<br />
<br />
</div><br />
<div style="float:right; width: 48%"><br />
{{Code|Define Poisson problem with fenics python|<syntaxhighlight lang="python" style="font-size:13px"> <br />
from dolfin import *<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
# Create mesh and define function space<br />
<br />
mesh = UnitSquareMesh(32, 32)<br />
<br />
V = FunctionSpace(mesh, "Lagrange", 1)<br />
<br />
# Define Dirichlet boundary (x = 0 or x = 1)<br />
def boundary(x):<br />
return x[0] < DOLFIN_EPS or x[0] > 1.0 - DOLFIN_EPS<br />
<br />
# Define boundary condition<br />
u0 = Constant(0.0)<br />
bc = DirichletBC(V, u0, boundary)<br />
<br />
# Define variational problem<br />
<br />
u = TrialFunction(V)<br />
v = TestFunction(V)<br />
<br />
<br />
<br />
f = Expression("10*exp(-(pow(x[0] - 0.5, 2) + <br />
pow(x[1] - 0.5, 2)) / 0.02)")<br />
g = Expression("sin(5*x[0])")<br />
<br />
<br />
<br />
<br />
<br />
a = inner(grad(u), grad(v))*dx<br />
L = f*v*dx + g*v*ds<br />
<br />
# Compute solution<br />
u = Function(V)<br />
(A, b) = assemble_system (a, L, bc);<br />
solve(A, u.vector(), b, "gmres", "default")<br />
<br />
<br />
# Save solution in VTK format<br />
file = File("poisson.pvd")<br />
file << u<br />
<br />
# Plot solution<br />
plot(u, interactive=True)<br />
<br />
© Copyright 2011, The FEniCS Project<br />
</syntaxhighlight>}}<br />
</div><br />
</div><br />
<div style="clear:both"></div><br />
<br />
=== Mixed Formulation for Poisson Equation ===<br />
In this example the Poisson equation is solved with a '''mixed approach''': the stable FE space obtained using Brezzi-Douglas-Marini polynomial of order 1 and Discontinuos elements of order 0 is used.<br />
<br />
<math>-\mathrm{div}\ ( \mathbf{\sigma} (x, y) ) ) = f (x, y) \qquad \mbox{ in } \Omega</math><br />
<br />
<math> \sigma (x, y) = \nabla u (x, y) \qquad \mbox{ in } \Omega</math><br />
<br />
<math>u(x, y) = 0 \qquad \mbox{ on } \Gamma_D</math><br />
<br />
<math>(\sigma (x, y) ) \cdot \mathbf{n} = \sin (5x) \qquad \mbox{ on } \Gamma_N</math><br />
<br />
A complete description of the problem is available on the [http://fenicsproject.org/documentation/dolfin/1.2.0/python/demo/pde/mixed-poisson/python/documentation.html Fenics website.]<br />
<div style="width: 100%;"><br />
<div style="float:left; width: 48%"><br />
{{Code|Define MixedPoisson problem with fem-fenics|<syntaxhighlight lang="octave" style="font-size:13px"> <br />
pkg load fem-fenics msh<br />
<br />
ufl start MixedPoisson<br />
ufl<br />
ufl BDM = FiniteElement("BDM", triangle, 1)<br />
ufl DG = FiniteElement("DG", triangle, 0)<br />
ufl W = BDM * DG<br />
ufl<br />
ufl "(sigma, u)" = TrialFunctions(W)<br />
ufl "(tau, v)" = TestFunctions(W)<br />
ufl<br />
ufl CG = FiniteElement("CG", triangle, 1)<br />
ufl f = Coefficient(CG)<br />
ufl<br />
ufl a = (dot(sigma, tau) + div(tau)*u + div(sigma)*v)*dx<br />
ufl L = - f*v*dx<br />
ufl end<br />
<br />
# Create mesh<br />
x = y = linspace (0, 1, 33);<br />
mesh = Mesh(msh2m_structured_mesh (x, y, 1, 1:4));<br />
<br />
# ufl snippet above<br />
# BDM = FiniteElement("BDM", triangle, 1)<br />
# DG = FiniteElement("DG", triangle, 0)<br />
# W = BDM * DG<br />
V = FunctionSpace('MixedPoisson', mesh);<br />
<br />
# Define trial and test function<br />
# ufl snippet above<br />
# (sigma, u) = TrialFunctions(W)<br />
# (tau, v) = TestFunctions(W)<br />
# CG = FiniteElement("CG", triangle, 1)<br />
# f = Coefficient(CG)<br />
f = Expression ('f', <br />
@(x,y) 10*exp(-((x - 0.5)^2 + (y - 0.5)^2) / 0.02));<br />
<br />
# Define variational form<br />
# ufl snippet above<br />
# a = (dot(sigma, tau) + div(tau)*u + div(sigma)*v)*dx<br />
# L = - f*v*dx<br />
a = BilinearForm ('MixedPoisson', V, V);<br />
L = LinearForm ('MixedPoisson', V, f);<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
# Define essential boundary<br />
<br />
<br />
bc1 = DirichletBC (SubSpace (V, 1), @(x,y) [0; -sin(5.0*x)], 1);<br />
bc2 = DirichletBC (SubSpace (V, 1), @(x,y) [0; sin(5.0*x)], 3);<br />
<br />
# Compute solution<br />
[A, b] = assemble_system (a, L, bc1, bc2);<br />
sol = A \ b;<br />
func = Function ('func', V, sol);<br />
<br />
sigma = Function ('sigma', func, 1);<br />
u = Function ('u', func, 2);<br />
<br />
# Plot solution<br />
plot (sigma);<br />
plot (u);<br />
<br />
<br />
</syntaxhighlight>}}<br />
<br />
</div><br />
<div style="float:right; width: 48%"><br />
{{Code|Define MixedPoisson problem with fenics python|<syntaxhighlight lang="python" style="font-size:13px"> <br />
from dolfin import *<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
# Create mesh<br />
<br />
mesh = UnitSquareMesh(32, 32)<br />
<br />
# Define function spaces and mixed (product) space<br />
BDM = FunctionSpace(mesh, "BDM", 1)<br />
DG = FunctionSpace(mesh, "DG", 0)<br />
W = BDM * DG<br />
<br />
<br />
<br />
# Define trial and test functions<br />
(sigma, u) = TrialFunctions(W)<br />
(tau, v) = TestFunctions(W)<br />
<br />
<br />
f = Expression<br />
("10*exp(-(pow(x[0] - 0.5, 2) + pow(x[1] - 0.5, 2)) / 0.02)")<br />
<br />
# Define variational form<br />
<br />
a = (dot(sigma, tau) + div(tau)*u + div(sigma)*v)*dx<br />
L = - f*v*dx<br />
<br />
<br />
<br />
# Define function G such that G \cdot n = g<br />
class BoundarySource(Expression):<br />
def __init__(self, mesh):<br />
self.mesh = mesh<br />
def eval_cell(self, values, x, ufc_cell):<br />
cell = Cell(self.mesh, ufc_cell.index)<br />
n = cell.normal(ufc_cell.local_facet)<br />
g = sin(5*x[0])<br />
values[0] = g*n[0]<br />
values[1] = g*n[1]<br />
def value_shape(self):<br />
return (2,)<br />
<br />
G = BoundarySource(mesh)<br />
<br />
# Define essential boundary<br />
def boundary(x):<br />
return x[1] < DOLFIN_EPS or x[1] > 1.0 - DOLFIN_EPS<br />
<br />
bc = DirichletBC(W.sub(0), G, boundary)<br />
<br />
# Compute solution<br />
w = Function(W)<br />
solve(a == L, w, bc)<br />
<br />
<br />
(sigma, u) = w.split()<br />
<br />
<br />
# Plot sigma and u<br />
plot(sigma)<br />
plot(u)<br />
interactive()<br />
<br />
© Copyright 2011, The FEniCS Project<br />
</syntaxhighlight>}}<br />
</div><br />
</div><br />
<div style="clear:both"></div><br />
<br />
=== Hyperelasticity ===<br />
This time we compare the code with the C++ version of DOLFIN. The problem for an elastic material can be expressed as a minimization problem<br />
<br />
<math> \min_{u \in V} \Pi</math><br />
<br />
<math> \Pi = \int_{\Omega} \psi(u) \, {\rm d} x - \int_{\Omega} B \cdot u \, {\rm d} x - \int_{\partial\Omega} T \cdot u \, {\rm d} s</math><br />
<br />
where \Pi is the total potential energy, \psi is the elastic stored energy, \B is a body force and \T is a traction force.<br />
<br />
A complete description of the problem is avilable on the [http://fenicsproject.org/documentation/dolfin/1.2.0/cpp/demo/pde/hyperelasticity/cpp/documentation.html Fenics website.] The final solution will look like this<br />
[[File:HyperElasticity.png|Location = center|Alignement = center]]<br />
<br />
{{Code|HyperElasticity Problem: the ufl file|<syntaxhighlight lang="octave" style="font-size:13px"> <br />
# Function spaces<br />
element = VectorElement("Lagrange", tetrahedron, 1)<br />
<br />
# Trial and test functions<br />
du = TrialFunction(element) # Incremental displacement<br />
v = TestFunction(element) # Test function<br />
<br />
# Functions<br />
u = Coefficient(element) # Displacement from previous iteration<br />
B = Coefficient(element) # Body force per unit volume<br />
T = Coefficient(element) # Traction force on the boundary<br />
<br />
# Kinematics<br />
I = Identity(element.cell().d) # Identity tensor<br />
F = I + grad(u) # Deformation gradient<br />
C = F.T*F # Right Cauchy-Green tensor<br />
<br />
# Invariants of deformation tensors<br />
Ic = tr(C)<br />
J = det(F)<br />
<br />
# Elasticity parameters<br />
mu = Constant(tetrahedron)<br />
lmbda = Constant(tetrahedron)<br />
<br />
# Stored strain energy density (compressible neo-Hookean model)<br />
psi = (mu/2)*(Ic - 3) - mu*ln(J) + (lmbda/2)*(ln(J))**2<br />
<br />
# Total potential energy<br />
Pi = psi*dx - inner(B, u)*dx - inner(T, u)*ds<br />
<br />
# First variation of Pi (directional derivative about u in the direction of v)<br />
F = derivative(Pi, u, v)<br />
<br />
# Compute Jacobian of F<br />
J = derivative(F, u, du)<br />
<br />
© Copyright 2011, The FEniCS Project<br />
</syntaxhighlight>}}<br />
<br />
<br />
<br />
<div style="width: 100%;"><br />
<div style="float:left; width: 48%"><br />
{{Code|Define HyperElasticity problem with fem-fenics|<syntaxhighlight lang="octave" style="font-size:13px"> <br />
pkg load fem-fenics msh<br />
<br />
<br />
<br />
ufl start HyperElasticity<br />
ufl # Function spaces<br />
ufl element = VectorElement("Lagrange", tetrahedron, 1)<br />
ufl<br />
ufl # Trial and test functions<br />
ufl du = TrialFunction(element) # Incremental displacement<br />
ufl v = TestFunction(element) # Test function<br />
ufl<br />
ufl # Functions<br />
ufl u = Coefficient(element) # Displacement from previous iteration<br />
ufl B = Coefficient(element) # Body force per unit volume<br />
ufl T = Coefficient(element) # Traction force on the boundary<br />
ufl<br />
ufl # Kinematics<br />
ufl I = Identity(element.cell().d) # Identity tensor<br />
ufl F = I + grad(u) # Deformation gradient<br />
ufl C = F.T*F # Right Cauchy-Green tensor<br />
ufl<br />
ufl # Invariants of deformation tensors<br />
ufl Ic = tr(C)<br />
ufl J = det(F)<br />
ufl<br />
ufl # Elasticity parameters<br />
ufl mu = Constant(tetrahedron)<br />
ufl lmbda = Constant(tetrahedron)<br />
ufl<br />
ufl # Stored strain energy density (compressible neo-Hookean model)<br />
ufl psi = (mu/2)*(Ic - 3) - mu*ln(J) + (lmbda/2)*(ln(J))**2<br />
ufl<br />
ufl # Total potential energy<br />
ufl Pi = psi*dx - inner(B, u)*dx - inner(T, u)*ds<br />
ufl<br />
ufl # First variation of Pi (directional derivative about u in the direction of v)<br />
ufl F = derivative(Pi, u, v)<br />
ufl<br />
ufl # Compute Jacobian of F<br />
ufl J = derivative(F, u, du)<br />
ufl end<br />
<br />
problem = 'HyperElasticity';<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Rotation = @(x,y,z) ...<br />
[0; ...<br />
0.5*(0.5 + (y - 0.5)*cos(pi/3) - (z-0.5)*sin(pi/3) - y);...<br />
0.5*(0.5 + (y - 0.5)*sin(pi/3) + (z-0.5)*cos(pi/3) - z)];<br />
<br />
<br />
<br />
<br />
<br />
<br />
#Create mesh and define function space<br />
x = y = z = linspace (0, 1, 17);<br />
mshd = Mesh (msh3m_structured_mesh (x, y, z, 1, 1:6));<br />
V = FunctionSpace (problem, mshd);<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
# Create Dirichlet boundary conditions<br />
bcl = DirichletBC (V, @(x,y,z) [0; 0; 0], 1);<br />
bcr = DirichletBC (V, Rotation, 2);<br />
bcs = {bcl, bcr};<br />
<br />
<br />
# Define source and boundary traction functions<br />
B = Constant ('B', [0.0; -0.5; 0.0]);<br />
T = Constant ('T', [0.1; 0.0; 0.0]);<br />
<br />
<br />
<br />
<br />
# Set material parameters<br />
E = 10.0;<br />
nu = 0.3;<br />
mu = Constant ('mu', E./(2*(1+nu)));<br />
lmbda = Constant ('lmbda', E*nu./((1+nu)*(1-2*nu)));<br />
u = Expression ('u', @(x,y,z) [0; 0; 0]);<br />
<br />
# Create (linear) form defining (nonlinear) variational problem<br />
L = ResidualForm (problem, V, mu, lmbda, B, T, u);<br />
<br />
<br />
<br />
<br />
<br />
<br />
# Solve nonlinear variational problem F(u; v) = 0<br />
u0 = assemble (L, bcs{:});<br />
# Create function for the resolution of the NL problem<br />
function [y, jac] = f (problem, xx, V, bc1, bc2, B, T, mu, lmbda)<br />
u = Function ('u', V, xx);<br />
a = JacobianForm (problem, V, mu, lmbda, u);<br />
L = ResidualForm (problem, V, mu, lmbda, B, T, u);<br />
if (nargout == 1)<br />
[y, xx] = assemble (L, xx, bc1, bc2);<br />
elseif (nargout == 2)<br />
[jac, y, xx] = assemble_system (a, L, xx, bc1, bc2);<br />
endif<br />
endfunction<br />
<br />
fs = @(xx) f (problem, xx, V, bcl, bcr, B, T, mu, lmbda);<br />
[x, fval, info] = fsolve (fs, u0, optimset ("jacobian", "on"));<br />
func = Function ('u', V, x);<br />
<br />
# Save solution in VTK format<br />
save (func, 'displacement');<br />
<br />
<br />
# Plot solution<br />
plot (func);<br />
<br />
<br />
</syntaxhighlight>}}<br />
<br />
</div><br />
<div style="float:right; width: 48%"><br />
{{Code|Define HyperElasticity problem with fenics c++|<syntaxhighlight lang="cpp" style="font-size:13px"> <br />
#include <dolfin.h><br />
#include "HyperElasticity.h"<br />
<br />
using namespace dolfin;<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
// Sub domain for clamp at left end<br />
class Left : public SubDomain<br />
{<br />
bool inside(const Array<double>& x, bool on_boundary) const<br />
{<br />
return (std::abs(x[0]) < DOLFIN_EPS) && on_boundary;<br />
}<br />
};<br />
<br />
// Sub domain for rotation at right end<br />
class Right : public SubDomain<br />
{<br />
bool inside(const Array<double>& x, bool on_boundary) const<br />
{<br />
return (std::abs(x[0] - 1.0) < DOLFIN_EPS) && on_boundary;<br />
}<br />
};<br />
<br />
// Dirichlet boundary condition for clamp at left end<br />
class Clamp : public Expression<br />
{<br />
public:<br />
<br />
Clamp() : Expression(3) {}<br />
<br />
void eval(Array<double>& values, const Array<double>& x) const<br />
{<br />
values[0] = 0.0;<br />
values[1] = 0.0;<br />
values[2] = 0.0;<br />
}<br />
<br />
};<br />
<br />
// Dirichlet boundary condition for rotation at right end<br />
class Rotation : public Expression<br />
{<br />
public:<br />
<br />
Rotation() : Expression(3) {}<br />
<br />
void eval(Array<double>& values, const Array<double>& x) const<br />
{<br />
const double scale = 0.5;<br />
<br />
// Center of rotation<br />
const double y0 = 0.5;<br />
const double z0 = 0.5;<br />
<br />
// Large angle of rotation (60 degrees)<br />
double theta = 1.04719755;<br />
<br />
// New coordinates<br />
double y = y0 + (x[1]-y0)*cos(theta) - (x[2]-z0)*sin(theta);<br />
double z = z0 + (x[1]-y0)*sin(theta) + (x[2]-z0)*cos(theta);<br />
<br />
// Rotate at right end<br />
values[0] = 0.0;<br />
values[1] = scale*(y - x[1]);<br />
values[2] = scale*(z - x[2]);<br />
}<br />
<br />
};<br />
<br />
int main()<br />
{<br />
// Create mesh and define function space<br />
UnitCubeMesh mesh (16, 16, 16);<br />
HyperElasticity::FunctionSpace V(mesh);<br />
<br />
// Define Dirichlet boundaries<br />
Left left;<br />
Right right;<br />
<br />
// Define Dirichlet boundary functions<br />
Clamp c;<br />
Rotation r;<br />
<br />
// Create Dirichlet boundary conditions<br />
DirichletBC bcl(V, c, left);<br />
DirichletBC bcr(V, r, right);<br />
std::vector<const BoundaryCondition*> bcs;<br />
bcs.push_back(&bcl); bcs.push_back(&bcr);<br />
<br />
// Define source and boundary traction functions<br />
Constant B(0.0, -0.5, 0.0);<br />
Constant T(0.1, 0.0, 0.0);<br />
<br />
// Define solution function<br />
Function u(V);<br />
<br />
// Set material parameters<br />
const double E = 10.0;<br />
const double nu = 0.3;<br />
Constant mu(E/(2*(1 + nu)));<br />
Constant lambda(E*nu/((1 + nu)*(1 - 2*nu)));<br />
<br />
<br />
// Create (linear) form defining (nonlinear) variational problem<br />
HyperElasticity::ResidualForm F(V);<br />
F.mu = mu; F.lmbda = lambda; F.B = B; F.T = T; F.u = u;<br />
<br />
// Create jacobian dF = F' (for use in nonlinear solver).<br />
HyperElasticity::JacobianForm J(V, V);<br />
J.mu = mu; J.lmbda = lambda; J.u = u;<br />
<br />
// Solve nonlinear variational problem F(u; v) = 0<br />
solve(F == 0, u, bcs, J);<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
// Save solution in VTK format<br />
File file("displacement.pvd");<br />
file << u;<br />
<br />
// Plot solution<br />
plot(u);<br />
interactive();<br />
<br />
return 0;<br />
}<br />
© Copyright 2011, The FEniCS Project<br />
</syntaxhighlight>}}<br />
</div><br />
</div><br />
<div style="clear:both"></div><br />
<br />
=== Incompressible Navier-Stokes equations ===<br />
<br />
The incompressible Navier-Stokes equations are solved using the Chorin-Temam projection algorithm. [http://en.wikipedia.org/wiki/Projection_method_%28fluid_dynamics%29#Chorin.27s_projection_method].<br />
A complete description of the specific problem is avilable on the [http://fenicsproject.org/documentation/dolfin/1.2.0/python/demo/pde/navier-stokes/python/documentation.html Fenics website.]<br />
<br />
<div style="width: 100%;"><br />
<div style="float:left; width: 48%"><br />
{{Code|Define HyperElasticity problem with fem-fenics|<syntaxhighlight lang="octave" style="font-size:13px"> <br />
pkg load fem-fenics msh<br />
import_ufl_Problem ("TentativeVelocity");<br />
import_ufl_Problem ("VelocityUpdate");<br />
import_ufl_Problem ("PressureUpdate");<br />
<br />
# We can either load the mesh from the file as in Dolfin but <br />
# we can also use the msh pkg to generate the L-shape domain<br />
name = [tmpnam ".geo"];<br />
fid = fopen (name, "w");<br />
fputs (fid,"Point (1) = {0, 0, 0, 0.1};\n");<br />
fputs (fid,"Point (2) = {1, 0, 0, 0.1};\n");<br />
fputs (fid,"Point (3) = {1, 0.5, 0, 0.1};\n");<br />
fputs (fid,"Point (4) = {0.5, 0.5, 0, 0.1};\n");<br />
fputs (fid,"Point (5) = {0.5, 1, 0, 0.1};\n");<br />
fputs (fid,"Point (6) = {0, 1, 0,0.1};\n");<br />
<br />
fputs (fid,"Line (1) = {5, 6};\n");<br />
fputs (fid,"Line (2) = {2, 3};\n");<br />
<br />
fputs (fid,"Line(3) = {6,1,2};\n");<br />
fputs (fid,"Line(4) = {5,4,3};\n");<br />
fputs (fid,"Line Loop(7) = {3,2,-4,1};\n");<br />
fputs (fid,"Plane Surface(8) = {7};\n");<br />
fclose (fid);<br />
msho = msh2m_gmsh (canonicalize_file_name (name)(1:end-4),...<br />
"scale", 1,"clscale", .2);<br />
unlink (canonicalize_file_name (name));<br />
<br />
mesh = Mesh (msho);<br />
<br />
# Define function spaces (P2-P1). From ufl file<br />
# V = VectorElement("CG", triangle, 2)<br />
# Q = FiniteElement("CG", triangle, 1)<br />
V = FunctionSpace ('VelocityUpdate', mesh);<br />
Q = FunctionSpace ('PressureUpdate', mesh);<br />
<br />
# Define trial and test functions. From ufl file<br />
# u = TrialFunction(V)<br />
# p = TrialFunction(Q)<br />
# v = TestFunction(V)<br />
# q = TestFunction(Q)<br />
<br />
# Set parameter values. From ufl file<br />
# nu = 0.01<br />
dt = 0.01;<br />
T = 3.;<br />
<br />
<br />
<br />
<br />
# Define boundary conditions<br />
noslip = DirichletBC (V, @(x,y) [0; 0], [3, 4]);<br />
<br />
<br />
<br />
<br />
outflow = DirichletBC (Q, @(x,y) 0, 2);<br />
<br />
<br />
<br />
# Create functions<br />
u0 = Expression ('u0', @(x,y) [0; 0]);<br />
<br />
<br />
<br />
# Define coefficients<br />
k = Constant ('k', dt);<br />
f = Constant ('f', [0; 0]);<br />
<br />
# Tentative velocity step. From ufl file<br />
# eq = (1/k)*inner(u - u0, v)*dx + inner(grad(u0)*u0, v)*dx \<br />
# + nu*inner(grad(u), grad(v))*dx - inner(f, v)*dx<br />
a1 = BilinearForm ('TentativeVelocity', V, V, k);<br />
<br />
<br />
# Pressure update. From ufl file<br />
# a = inner(grad(p), grad(q))*dx<br />
# L = -(1/k)*div(u1)*q*dx<br />
a2 = BilinearForm ('PressureUpdate', Q, Q);<br />
<br />
# Velocity update<br />
# a = inner(u, v)*dx<br />
# L = inner(u1, v)*dx - k*inner(grad(p1), v)*dx<br />
a3 = BilinearForm ('VelocityUpdate', V, V);<br />
<br />
# Assemble matrices<br />
A1 = assemble (a1, noslip);<br />
<br />
A3 = assemble (a3, noslip);<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
# Time-stepping<br />
t = dt; i = 0;<br />
while t < T<br />
<br />
# Update pressure boundary condition<br />
inflow = DirichletBC (Q, @(x,y) sin(3.0*t), 1);<br />
<br />
# Compute tentative velocity step<br />
"Computing tentative velocity"<br />
L1 = LinearForm ('TentativeVelocity', V, k, u0, f);<br />
b1 = assemble (L1, noslip);<br />
utmp = A1 \ b1;<br />
u1 = Function ('u1', V, utmp);<br />
<br />
# Pressure correction<br />
"Computing pressure correction"<br />
L2 = LinearForm ('PressureUpdate', Q, u1, k);<br />
[A2, b2] = assemble_system (a2, L2, inflow, outflow);<br />
ptmp = A2 \ b2;<br />
p1 = Function ('p1', Q, ptmp);<br />
<br />
# Velocity correction<br />
"Computing velocity correction"<br />
L3 = LinearForm ('VelocityUpdate', V, k, u1, p1);<br />
b3 = assemble (L3, noslip);<br />
ut = A3 \ b3;<br />
u1 = Function ('u0', V, ut);<br />
<br />
# Plot solution<br />
plot (p1);<br />
plot (u1);<br />
<br />
# Save to file<br />
save (p1, sprintf ("p_%3.3d", ++i));<br />
save (u1, sprintf ("u_%3.3d", i));<br />
<br />
# Move to next time step<br />
u0 = u1;<br />
t += dt<br />
<br />
end<br />
</syntaxhighlight>}}<br />
<br />
</div><br />
<div style="float:right; width: 48%"><br />
{{Code|Define NS problem with fenics python |<syntaxhighlight lang="python" style="font-size:13px"> <br />
from dolfin import *<br />
<br />
<br />
<br />
<br />
# Load mesh from file<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
mesh = Mesh("lshape.xml.gz")<br />
<br />
# Define function spaces (P2-P1)<br />
<br />
<br />
V = VectorFunctionSpace(mesh, "CG", 2)<br />
Q = FunctionSpace(mesh, "CG", 1)<br />
<br />
# Define trial and test functions<br />
u = TrialFunction(V)<br />
p = TrialFunction(Q)<br />
v = TestFunction(V)<br />
q = TestFunction(Q)<br />
<br />
# Set parameter values<br />
dt = 0.01<br />
T = 3<br />
nu = 0.01<br />
<br />
# Define time-dependent pressure boundary condition<br />
p_in = Expression("sin(3.0*t)", t=0.0)<br />
<br />
# Define boundary conditions<br />
noslip = DirichletBC(V, (0, 0),<br />
"on_boundary && \<br />
(x[0] < DOLFIN_EPS | x[1] < DOLFIN_EPS | \<br />
(x[0] > 0.5 - DOLFIN_EPS && x[1] > 0.5 - DOLFIN_EPS))")<br />
inflow = DirichletBC(Q, p_in, "x[1] > 1.0 - DOLFIN_EPS")<br />
outflow = DirichletBC(Q, 0, "x[0] > 1.0 - DOLFIN_EPS")<br />
bcu = [noslip]<br />
bcp = [inflow, outflow]<br />
<br />
# Create functions<br />
u0 = Function(V)<br />
u1 = Function(V)<br />
p1 = Function(Q)<br />
<br />
# Define coefficients<br />
k = Constant(dt)<br />
f = Constant((0, 0))<br />
<br />
# Tentative velocity step<br />
F1 = (1/k)*inner(u - u0, v)*dx + inner(grad(u0)*u0, v)*dx \<br />
+ nu*inner(grad(u), grad(v))*dx - inner(f, v)*dx<br />
a1 = lhs(F1)<br />
L1 = rhs(F1)<br />
<br />
# Pressure update<br />
a2 = inner(grad(p), grad(q))*dx<br />
L2 = -(1/k)*div(u1)*q*dx<br />
<br />
<br />
# Velocity update<br />
a3 = inner(u, v)*dx<br />
L3 = inner(u1, v)*dx - k*inner(grad(p1), v)*dx<br />
<br />
<br />
# Assemble matrices<br />
A1 = assemble(a1)<br />
A2 = assemble(a2)<br />
A3 = assemble(a3)<br />
<br />
# Use amg preconditioner if available<br />
prec = "amg" if has_krylov_solver_preconditioner("amg") <br />
else "default"<br />
<br />
# Create files for storing solution<br />
ufile = File("results/velocity.pvd")<br />
pfile = File("results/pressure.pvd")<br />
<br />
# Time-stepping<br />
t = dt<br />
while t < T + DOLFIN_EPS:<br />
<br />
# Update pressure boundary condition<br />
p_in.t = t<br />
<br />
# Compute tentative velocity step<br />
begin("Computing tentative velocity")<br />
b1 = assemble(L1)<br />
[bc.apply(A1, b1) for bc in bcu]<br />
solve(A1, u1.vector(), b1, "gmres", "default")<br />
end()<br />
<br />
# Pressure correction<br />
begin("Computing pressure correction")<br />
b2 = assemble(L2)<br />
[bc.apply(A2, b2) for bc in bcp]<br />
solve(A2, p1.vector(), b2, "gmres", prec)<br />
end()<br />
<br />
# Velocity correction<br />
begin("Computing velocity correction")<br />
b3 = assemble(L3)<br />
[bc.apply(A3, b3) for bc in bcu]<br />
solve(A3, u1.vector(), b3, "gmres", "default")<br />
end()<br />
<br />
# Plot solution<br />
plot(p1, title="Pressure", rescale=True)<br />
plot(u1, title="Velocity", rescale=True)<br />
<br />
# Save to file<br />
ufile << u1<br />
pfile << p1<br />
<br />
# Move to next time step<br />
u0.assign(u1)<br />
t += dt<br />
print "t =", t<br />
<br />
# Hold plot<br />
interactive()<br />
© Copyright 2011, The FEniCS Project<br />
</syntaxhighlight>}}<br />
</div><br />
</div><br />
<div style="clear:both"></div><br />
<br />
=== Obstacles in the Domain ===<br />
<br />
[[File:Fem_fenics_Subdomains.png|right|500px]]<br />
<br />
<br />
<math> - \mathrm {div} (a \nabla u) = 1 \quad \mbox { in } \Omega, </math><br />
<br />
<math> u = 5 \quad \mbox { on } \Gamma_T, </math><br />
<br />
<math> u = 0 \quad \mbox { on } \Gamma_B, </math><br />
<br />
<math> \nabla u \cdot \mathbf {n} = - 10 e^{- (y - 0.5)^2} \quad \mbox { on } \Gamma_L, </math><br />
<br />
<math> \nabla u \cdot \mathbf {n} = 1 \quad \mbox { on } \Gamma_R </math><br />
<br />
<br />
<br />
<br />
The above example is a weighted Poisson problem on the unit square. The diffusion coefficient <math> a </math> assumes value 0.01 on the obstacle <math> \Omega_1 = [0.5, 0.7] \times [0.2, 1.0] </math>, whilst 1 outside on <math> \Omega_0 = \Omega \setminus \Omega_1 </math>. You can find a detailed explanation on the [http://fenicsproject.org/documentation/dolfin/1.4.0/python/demo/documented/subdomains-poisson/python/documentation.html FEniCS website]. On the side, you can see the solution.<br />
<br />
<div style="clear: both"></div><br />
<div style="width: 100%;"><br />
<div style="float:left; width: 48%"><br />
{{Code|Define Poisson problem with obstacle with fem-fenics|<syntaxhighlight lang="octave" style="font-size:13px"><br />
pkg load fem-fenics msh<br />
<br />
# Create mesh<br />
x = y = linspace (0, 1, 65);<br />
[msh, facets] = Mesh (msh2m_structured_mesh (x, y, 0, 4:-1:1));<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
ufl start Subdomains<br />
ufl fe = FiniteElement "(""CG"", triangle, 2)"<br />
ufl u = TrialFunction (fe)<br />
ufl v = TestFunction (fe)<br />
ufl<br />
ufl a0 = Coefficient (fe)<br />
ufl a1 = Coefficient (fe)<br />
ufl g_L = Coefficient (fe)<br />
ufl g_R = Coefficient (fe)<br />
ufl f = Coefficient (fe)<br />
ufl<br />
ufl a= "inner(a0*grad(u),grad(v))*dx(0) + inner(a1*grad(u),grad(v))*dx(1)"<br />
ufl L = g_L*v*ds(1) + g_R*v*ds(3) + f*v*dx(0) + f*v*dx(1)<br />
ufl end<br />
<br />
V = FunctionSpace ("Subdomains", msh);<br />
<br />
# Define problem coefficients<br />
a0 = Constant ("a0", 1.0);<br />
a1 = Constant ("a1", 0.01);<br />
g_L = Expression ("g_L", @(x, y) - 10*exp(- (y - 0.5) ^ 2));<br />
g_R = Constant ("g_R", 1.0);<br />
f = Constant ("f", 1.0);<br />
<br />
# Define subdomains<br />
<br />
<br />
<br />
<br />
<br />
domains = MeshFunction ("dx", msh, 2, 0);<br />
<br />
obstacle = SubDomain (@(x,y) (y >= 0.5) && (y <= 0.7) && ...<br />
(x >= 0.2) && (x <= 1.0), false);<br />
domains = mark (obstacle, domains, 1);<br />
<br />
# Define boundary conditions<br />
bc1 = DirichletBC (V, @(x, y) 5.0, facets, 2);<br />
bc2 = DirichletBC (V, @(x, y) 0.0, facets, 4);<br />
<br />
<br />
<br />
<br />
<br />
<br />
# Define variational form<br />
a = BilinearForm ("Subdomains", V, V, a0, a1, domains);<br />
L = LinearForm ("Subdomains", V, g_L, g_R, f, facets, domains);<br />
<br />
<br />
<br />
<br />
<br />
# Solve problem<br />
[A, b] = assemble_system (a, L, bc1, bc2);<br />
sol = A \ b;<br />
u = Function ("u", V, sol);<br />
<br />
# Plot solution<br />
[X, Y] = meshgrid (x, y);<br />
U = u (X, Y);<br />
surf (X, Y, U);<br />
<br />
</syntaxhighlight>}}<br />
<br />
</div><br />
<div style="float:right; width: 48%"><br />
{{Code|Define Poisson problem with obstacle with FEniCS python |<syntaxhighlight lang="python" style="font-size:13px"><br />
from dolfin import *<br />
<br />
# Define mesh<br />
<br />
mesh = UnitSquareMesh(64, 64)<br />
<br />
# Create classes for defining parts of the boundaries<br />
class Left(SubDomain):<br />
def inside(self, x, on_boundary):<br />
return near(x[0], 0.0)<br />
<br />
class Right(SubDomain):<br />
def inside(self, x, on_boundary):<br />
return near(x[0], 1.0)<br />
<br />
class Bottom(SubDomain):<br />
def inside(self, x, on_boundary):<br />
return near(x[1], 0.0)<br />
<br />
class Top(SubDomain):<br />
def inside(self, x, on_boundary):<br />
return near(x[1], 1.0)<br />
<br />
# Initialize sub-domain instances<br />
left = Left()<br />
top = Top()<br />
right = Right()<br />
bottom = Bottom()<br />
<br />
# Initialize mesh function for boundary domains<br />
boundaries = FacetFunction("size_t", mesh)<br />
boundaries.set_all(0)<br />
left.mark(boundaries, 1)<br />
top.mark(boundaries, 2)<br />
right.mark(boundaries, 3)<br />
bottom.mark(boundaries, 4)<br />
<br />
# Define function space and basis functions<br />
V = FunctionSpace(mesh, "CG", 2)<br />
u = TrialFunction(V)<br />
v = TestFunction(V)<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
# Define input data<br />
a0 = Constant(1.0)<br />
a1 = Constant(0.01)<br />
g_L = Expression("- 10*exp(- pow(x[1] - 0.5, 2))")<br />
g_R = Constant("1.0")<br />
f = Constant(1.0)<br />
<br />
# Initialize mesh function for interior domains<br />
class Obstacle(SubDomain):<br />
def inside(self, x, on_boundary):<br />
return (between(x[1], (0.5, 0.7)) and between(x[0], (0.2, 1.0)))<br />
<br />
obstacle = Obstacle()<br />
domains = CellFunction("size_t", mesh)<br />
domains.set_all(0)<br />
<br />
<br />
obstacle.mark(domains, 1)<br />
<br />
# Define Dirichlet boundary conditions at top and bottom boundaries<br />
bcs = [DirichletBC(V, 5.0, boundaries, 2),<br />
DirichletBC(V, 0.0, boundaries, 4)]<br />
<br />
# Define new measures associated with the interior domains and<br />
# exterior boundaries<br />
dx = Measure("dx")[domains]<br />
ds = Measure("ds")[boundaries]<br />
<br />
# Define variational form<br />
F = (inner(a0*grad(u), grad(v))*dx(0) + inner(a1*grad(u), grad(v))*dx(1)<br />
- g_L*v*ds(1) - g_R*v*ds(3)<br />
- f*v*dx(0) - f*v*dx(1))<br />
<br />
# Separate left and right hand sides of equation<br />
a, L = lhs(F), rhs(F)<br />
<br />
# Solve problem<br />
u = Function(V)<br />
solve(a == L, u, bcs)<br />
<br />
<br />
# Plot solution<br />
plot(u, title="u")<br />
interactive()<br />
<br />
© Copyright 2011, The FEniCS Project<br />
</syntaxhighlight>}}<br />
</div><br />
</div><br />
<div style="clear:both"></div><br />
<br />
== Relevant Implementation Details ==<br />
<br />
The relevant implementation details which the user should know are:<br />
<br />
* All the objects are managed using boost::shared_ptr <>. It means that '''the same resource can be shared by more objects''' and useless copies should be avoided. For example, if we have two different functional spaces in the same problem, like with Navier-Stokes for the velocity and the pressure, the mesh is shared between them and no one has its own copy.<br />
<br />
* The '''essential BC are imposed directly to the matrix''' with the command '''assemble()''', which sets to zero all the off diagonal elements in the corresponding line, sets to 1 the diagonal element and sets to the exact value the rhs. This means that we could loose the symmetry of the matrix, if any. To avoid this problem and preserve the symmetry of the system it is available the '''assemble_system()''' command which builds at once the lhs and the rhs.<br />
<br />
* The '''coefficient of the variational problem''' can be specified using either an ''Expression()'', a ''Constant()'' or a ''Function()''. They are different objects which behave in different ways: an ''Expression'' or a ''Constant'' object overloads the eval() method of the dolfin::Expression class and it is evaluated at run time using the octave function feval (). A ''Function'' instead doesn't need to be evaluated because it is assembled copying element-by-element the values contained in the input vector.<br />
<br />
* Unfortunately the feature used in previous versions of the package to handle ''DirichletBC'' is not implemented yet in the FEniCS library for distributed execution. This means that prior to running code via MPI it should be adapted to use the newly introduced ''MeshFunction'' to mark border subsets, so that essential boundary conditions are correctly applied.<br />
<br />
== Known issues ==<br />
* Fem-fenics needs both in the installation phase and in normal usage some includes that are not in standard system include directories, namely those related to MPI and the Eigen template library. If you experience an installation failure or errors when importing your UFL files, then you should properly set your CPPFLAGS environment variable before launching Octave, as per [http://octave.1599824.n4.nabble.com/fem-fenics-0-0-1-released-tp4662182p4662195.html]. This can be done in {{Path|sh}} compatible shells with the command below:<br />
<syntaxhighlight lang="bash" style="font-size:13px"><br />
export CPPFLAGS="-I/usr/include/eigen3 $(mpicxx -showme:compile)"<br />
</syntaxhighlight><br />
Notice that {{Path|/usr/include/eigen3}} has to be changed accordingly to the path in which Eigen are to be found on your system.<br />
It should readily work in Ubuntu 13.10 and 14.04.<br />
<br />
* There is a known bug with Openmpi, discussed on the maintainers list [http://octave.1599824.n4.nabble.com/fem-fenics-0-0-1-released-tp4662182p4662234.html], that needs the preloading of a MPI shared library with the following command:<br />
<syntaxhighlight lang="bash" style="font-size:13px"><br />
export LD_PRELOAD=/usr/lib/openmpi/lib/libmpi.so<br />
</syntaxhighlight><br />
Again, notice that {{Path|/usr/lib/openmpi/lib/libmpi.so}} has to be changed to fit to your system.<br />
<br />
== Additional functionality / TODOS ==<br />
Obviously, Fem-fenics is not (yet) able to reproduce all the functionality available in Fenics. If there is any important features missing, please add it to the list below. (Or, better, you can directly submit your extension to the mercurial repository [https://sourceforge.net/p/octave/fem-fenics/ci/default/tree/]).<br />
<br />
* '''Norma'''l: add the possibility to use a reserved keyword (normal ?) to be used with the DirichletBC. <syntaxhighlight lang="octave" style="font-size:13px"> bc = DirichletBC (V, @(x, y, normal) [sin(x)*normal; 0], [3, 4]);</syntaxhighlight><br />
<br />
* <strike> @function/'''feval''': the function should accept as input also an array of values. </strike> Show how it can be used in an example with odepkg.<br />
<br />
== External Links ==<br />
* User manual [https://drive.google.com/file/d/0ByWLfuWVSWHbaXN3T3diaXEwU0k/edit?usp=sharing].<br />
* Repository [http://sourceforge.net/p/octave/fem-fenics/]<br />
* Functions reference [http://octave.sourceforge.net/fem-fenics/overview.html]<br />
* Presentation at MOX [https://drive.google.com/file/d/0ByWLfuWVSWHbZWZzRzY2em5PU28/edit?usp=sharing]<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Dicom_package&diff=11754
Dicom package
2019-03-12T23:26:55Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>At an early development stage.<br />
*Maintainer: Andy Buckle<br />
*Contributors: Judd Storrs, Kris Thielemans<br />
<br />
Auto-generated docs from the current package: {{Forge|dicom}}<br />
<br />
== What is the aim of this package? ==<br />
Digital communications in medicine (DICOM) is an information standard. Originally created for image transfer, the standard now deals with an large range of medical data. See http://medical.nema.org/ for more info.<br />
<br />
This package provides functions to read and (eventually) write DICOM files. The functions in the package are intended to have similar usage as<br />
the dicom functions in the Matlab Image Processing Toolbox. In Octave they are separate: most image package users will not use dicom, and its dependency might be considered troublesome.<br />
<br />
== Platforms ==<br />
*Linux. Tested on OpenSuSE 11.4 and Ubuntu. No known issues. GDCM is required: see below.<br />
*mingw <br />
**Ben Lindner's Octave 3.2.4 and the mingw build environment (gcc 4.4.0): dicom package 0.1.1 does not build against this older version of the Octave API.<br />
**Tatsuro/Nitzan's Octave 3.4.3 and mingw build environment (gcc 4.5.2): gdcm and dicom package build OK. Get segfault in ntdll.dll when one of the dicom*.oct files calls something from a gdcm*.dll.<br />
**mxe-octave: dicom and gdcm distributed as part of the installed package.<br />
*Cygwin: Panic when oct file called (or maybe when oct file uses gdcm dll). Need to try rebaseall<br />
<br />
==Supporting library==<br />
[http://sourceforge.net/apps/mediawiki/gdcm/index.php?title=Main_Page GDCM]. You can usually get this via your package manager, e.g. on Ubuntu<br />
<br />
sudo apt-get install libgdcm2.0<br />
<br />
Alternatively, build it yourself. Get the source with subversion.<br />
<br />
svn co https://gdcm.svn.sourceforge.net/svnroot/gdcm/branches/gdcm-2-0<br />
<br />
cmake and g++ are required. create a gdcmbin directory parallel to the gdcm-2-0 directory. Change to gdcmbin and then run cmake (Linux/cygwin).<br />
<br />
> mkdir gdcmbin<br />
> ls<br />
gdcmbin gdcm-2-0<br />
> cd gdcmbin<br />
> cmake -DGDCM_BUILD_SHARED_LIBS=ON ../gdcm-2-0/<br />
<br />
This creates a Makefile in your gdcmbin directory. You can easily edit cmake options with "make edit_cache", for example to build applications like gdcmdump. "make help" is also very useful.<br />
<br />
make install<br />
<br />
On my system, I also had to add this to my ~/.bashrc.<br />
<br />
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib<br />
<br />
Mingw32 is similar. Get openSSL: [http://www.slproweb.com/products/Win32OpenSSL.html Win32 Openssl v1.0.0a Light]<br />
<br />
cmake -G "MinGW Makefile" -DGDCM_BUILD_SHARED_LIBS=ON ..\gdcm-2-0<br />
mingw32-make all<br />
<br />
On Cygwin gdcm 2.0.18 (and maybe some other versions) may have a problem with newer cmake. This kludge persuades cmake to define WIN32.<br />
<br />
cmake -DGDCM_BUILD_SHARED_LIBS=ON -DCMAKE_CXX_COMPILER=g++.exe -DCMAKE_LEGACY_CYGWIN_WIN32=1 ../gdcm-2.0.18/<br />
<br />
==Features==<br />
All of these still need work, but they exist, and are usable to some extent.<br />
*dicomdict (load different dict - file follows same format as Matlab's)<br />
*dicominfo (load metadata into octave struct. possible bug in SQ loading)<br />
*dicomlookup (keyword <-> tag)<br />
*dicomread (load pixel data, 2D or 3D int types. Does not yield colormaps, yet.)<br />
*dicomwrite (write pixel data to a DICOM format file)<br />
*dicomuid (generate a DICOM unique id)<br />
*isdicom (verify if a file is a DICOM formatted file)<br />
<br />
==Todo==<br />
<br />
*dicomanon<br />
<br />
==Questions==<br />
I don't have a Matlab license available. I would like to make this package compatible with the dicom functions in Matlab's image processing toolbox, as far as possible.<br />
<br />
*Octave (and Matlab) stores images (y,x) and DICOM is intrinsically (x,y). Does Matlab transpose images when it loads them?<br />
**matlab reads the data from the dicom file as if it's a raw block of numbers (and then converts if necessary). We think that current Octave/dicom behaviour is compatible with matlab. <br />
*I would like people to try m-files that worked with Matlab to let me know of problems.<br />
*(not necessarily) Matlab related: I need examples of odd DICOM files. I have plenty with complex metadata, but I need some with unusual images.<br />
**More than one sample per pixel<br />
**Colour<br />
**Float types <br />
*DA (date) VR: does Matlab turn them into a string?<br />
*if the user supplies metadata (eg HighBit?, BitsStored?) that describe the type of the pixels and this is not in agreement with the type of the image matrix supplied, does Matlab<br />
**silently convert the image pixel type to match the metadata?<br />
**silently convert the metadata to match the pixel type?<br />
**error and do nothing? <br />
<br />
== Answered ==<br />
*dicominfo: Items in sequences are not necessarily the same, so are stored as nested structs like dcm.RTDoseROISequence.Item_1.DoseUnits(as Matlab)<br />
*What does dicominfo do when a tag is not in its dictionary? Answer: assign to a field like Private_3243_0010 (as Matlab)<br />
<br />
== See also ==<br />
* {{Forge|dicom}} at [[Octave Forge]].<br />
* [http://sourceforge.net/projects/gdcm/ Grassroots DICOM].<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Dataframe_package&diff=11753
Dataframe package
2019-03-12T23:26:16Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>Dataframe, Data manipulation toolbox similar to R data.frame <br />
<br />
At an mature development stage. [http://hg.code.sf.net/p/octave/dataframe hg]<br />
*Maintainer: Pascal Dupuis <br />
*Contributors: <br />
<br />
*Package: [http://octave.sourceforge.net/dataframe/ dataframe]<br />
<br />
This package permits to handle complex (both in the sense of complex numbers and high complexity) data as if they were ordinary arrays, except that each column MAY possess a different type. It also provides a fairly complete interface to CSV files, permitting to cope with a number of oddities, like e.g., CSV files starting with a header spread over a few lines. The resulting array tries as far as it can to mimic an array in such a way that binary operators and usual functions will work as expected.<br />
<br />
Meta-information is also handled. Rows and columns may have a name, and this name is searchable. If for whatever reason the ordering of a CSV file changes, searching by column names will return the expected information.<br />
<br />
To get a first taste, let's load the test csv file coming with the package:<br />
>> experiment = dataframe('data_test.csv')<br />
warning: load: '/home/padupuis/matlab/dataframe/inst/data_test.csv' found by searching load path<br />
warning: fopen: '/home/padupuis/matlab/dataframe/inst/data_test.csv' found by searching load path<br />
ans = dataframe with 10 rows and 7 columns<br />
Src: data_test.csv<br />
Comment: #notice there is a extra separator<br />
Comment: # a comment line and an empty one<br />
Comment: # the next lines use \r\n \r and \f as linefeed<br />
Comment: # one empty input field<br />
_1 DataName VBIAS Freq x_IBIAS_ C GOUT OK_<br />
Nr char double double double double double char<br />
1 DataValue -6.0000 300000 1.6272e-11 7.0215e-13 1.6044e-07 A<br />
2 DataValue -5.8000 300000 1.5990e-11 6.9607e-13 1.5728e-07 E<br />
3 DataValue -5.6000 300000 1.3790e-11 6.9048e-13 1.5489e-07 !<br />
4 DataValue -5.4000 300000 1.4420e-11 6.8517e-13 1.5478e-07 ?<br />
5 DataValue -5.2000 300000 1.2930e-11 6.7965e-13 1.5189e-07 C<br />
6 DataValue -5.0000 300000 1.2610e-11 6.7444e-13 1.4931e-07 B<br />
7 DataValue -4.8000 300000 1.4390e-11 6.7011e-13 1.4876e-07 A<br />
8 DataValue -4.6000 300000 1.0890e-11 6.6416e-13 1.4890e-07 3<br />
9 DataValue -4.4000 300000 NA 6.5859e-13 1.4558e-07 C<br />
10 DataValue -4.2000 300000 1.0610e-11 6.5355e-13 1.4431e-07 B<br />
<br />
Those data were produced while performing a voltage sweep on a sensor, measuring with an impedance bridge<br />
the parallel capacitor and conductance at a given frequency.<br />
<br />
The first lines contain few meta-information: name of the source file and a few comments found in the <br />
csv file. The purpose is to annotate the results.<br />
<br />
Then we have the content. Each column starts with a name, then a type. Next we find the content lines, each <br />
of them with an index. Then we find the content; control values (polarization voltage, applied frequency), <br />
then measured values: DC current, capacitor, conductance. The last column is categorical: the user introduced<br />
some code telling if the result makes senses or not.<br />
<br />
Let us now select the control values:<br />
cv = experiment(1:3, ["Vbias"; "Freq"])<br />
cv = dataframe with 3 rows and 1 columns<br />
Src: data_test.csv<br />
Comment: #notice there is a extra separator<br />
Comment: # a comment line and an empty one<br />
Comment: # the next lines use \r\n \r and \f as linefeed<br />
Comment: # one empty input field<br />
_1 Freq<br />
Nr double<br />
1 300000<br />
2 300000<br />
3 300000<br />
<br />
The selection occurred on a range for the lines, by names on the column. The search criteria is here a <br />
string array. All columns whose name match are returned.<br />
<br />
The result is returned as a dataframe. This can be changed:<br />
>> experiment.array(6, "OK_")<br />
ans = B<br />
>> class(ans)<br />
ans = char<br />
<br />
When selecting vectors, this transformation in array is automatic. The DC current is contained in elements<br />
31 to 40 (fourth column): <br />
>> experiment31:40)<br />
ans =<br />
Columns 1 through 9:<br />
1.6272e-11 1.5990e-11 1.3790e-11 1.4420e-11 1.2930e-11 1.2610e-11 1.4390e-11 1.0890e-11 NA<br />
Column 10:<br />
1.0610e-11<br />
Note that the access 'experiment("x_IBIAS")' is illegal: does it refer to row or column names ?<br />
<br />
;Accessing in this pseudo-structure way is valid in the following cases:<br />
;choosing the output format: array, cell, dataframe (may be abbreviated as 'df')<br />
;attribute selection: rownames, colnames, rowcnt, colcnt, rowidx, types, source, header, comment<br />
;constructor call: new (no other deferencing may occur<br />
;column selection: just provide one valid column name<br />
To be similar to R implementation, constructs such as x.as.array are also allowed.<br />
<br />
A simple example:<br />
truc={"Id", "Name", "Type";1, "onestring", "bla"; 2, "somestring", "foobar";}<br />
truc =<br />
{<br />
[1,1] = Id<br />
[2,1] = 1<br />
[3,1] = 2<br />
[1,2] = Name<br />
[2,2] = onestring<br />
[3,2] = somestring<br />
[1,3] = Type<br />
[2,3] = bla<br />
[3,3] = foobar<br />
}<br />
>> tt=dataframe(truc)<br />
tt = dataframe with 2 rows and 3 columns<br />
_1 Id Name Type<br />
Nr double char char<br />
1 1 onestring bla<br />
2 2 somestring foobar<br />
<br />
The first cell line is intended to contain column names; the rest is column content. The type is automatically inferred from the cell content. Now let us select one column by its name:<br />
>> tt(:, 'Name')<br />
ans = dataframe with 2 rows and 1 columns<br />
_1 Name<br />
Nr char<br />
1 onestring<br />
2 somestring<br />
<br />
In this case, a sub-dataframe is returned. Struct-like indexing is also implemented:<br />
>> tt.Id<br />
ans =<br />
1<br />
2<br />
When the output is a vector and can be simplified to something simple ... it is.<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Control_package&diff=11752
Control package
2019-03-12T23:25:26Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>The {{Forge|control}} package is part of the [[Octave Forge]] project. Its mercurial repository lies in [https://sourceforge.net/p/octave/control control] at the [[Octave Forge]]<br />
<br />
== Function list ==<br />
<br />
=== Linear System Representation ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! Chapter !! Function !! Implemented !! File !! Number of Tests !! Status !! SLICOT functions !! Priority (0-2)<br />
|-<br />
| rowspan="11" | Basic Models || tf || style="background: green;" | yes || @tf/tf.m || || || ||<br />
|-<br />
| zpk || style="background: green;" | yes || zpk.m || || || ||<br />
|-<br />
| ss || style="background: green;" | yes || @ss/ss.m || || || ||<br />
|-<br />
| frd || style="background: green;" | yes || @frd/frd.m || || || ||<br />
|- <br />
| pid || style="background: red;" | no || || || || ||<br />
|-<br />
| pidstd || style="background: red;" | no || || || || ||<br />
|-<br />
| pid2 || style="background: red;" | no || || || || ||<br />
|-<br />
| dss || style="background: green;" | yes || @lti/dss.m || || || ||<br />
|-<br />
| drss || style="background: red;" | no || || || || ||<br />
|-<br />
| filt || style="background: green;" | yes || filt.m || || || ||<br />
|-<br />
| rss || style="background: red;" | no || || || || ||<br />
|-<br />
| rowspan="24" | Tunable Models || ltiblock.gain || style="background: red;" | no || || || || ||<br />
|-<br />
| ltiblock.pid || style="background: red;" | no || || || || ||<br />
|-<br />
| ltiblock.pid2 || style="background: red;" | no || || || || ||<br />
|-<br />
| ltiblock.ss || style="background: red;" | no || || || || ||<br />
|-<br />
| ltiblock.tf || style="background: red;" | no || || || || ||<br />
|-<br />
| realp || style="background: red;" | no || || || || ||<br />
|-<br />
| AnalysisPoint || style="background: red;" | no || || || || ||<br />
|-<br />
| genss || style="background: red;" | no || || || || ||<br />
|-<br />
| genfrd || style="background: red;" | no || || || || ||<br />
|-<br />
| genmat || style="background: red;" | no || || || || ||<br />
|-<br />
| getLoopTransfer || style="background: red;" | no || || || || ||<br />
|-<br />
| getIOTransfer || style="background: red;" | no || || || || ||<br />
|-<br />
| getSensitivity || style="background: red;" | no || || || || ||<br />
|-<br />
| getCompSensitivity || style="background: red;" | no || || || || ||<br />
|-<br />
| getPoints || style="background: red;" | no || || || || ||<br />
|-<br />
| replaceBlock || style="background: red;" | no || || || || ||<br />
|-<br />
| getValue || style="background: red;" | no || || || || ||<br />
|-<br />
| setValue || style="background: red;" | no || || || || ||<br />
|-<br />
| getBlockValue || style="background: red;" | no || || || || ||<br />
|-<br />
| setBlockValue || style="background: red;" | no || || || || ||<br />
|-<br />
| showBlockValue || style="background: red;" | no || || || || ||<br />
|-<br />
| showTunable || style="background: red;" | no || || || || ||<br />
|-<br />
| nblocks || style="background: red;" | no || || || || ||<br />
|-<br />
| getLFTModel || style="background: red;" | no || || || || ||<br />
|-<br />
| rowspan="9" | Model with Time Delays || pade || style="background: red;" | no || || || || ||<br />
|-<br />
| absorbDelay || style="background: red;" | no || || || || ||<br />
|-<br />
| thiran || style="background: green;" | yes || thiran.m || || || ||<br />
|-<br />
| hasdelay || style="background: red;" | no || || || || ||<br />
|-<br />
| hasInternalDelay || style="background: red;" | no || || || || ||<br />
|-<br />
| totaldelay || style="background: red;" | no || || || || ||<br />
|-<br />
| delayss || style="background: red;" | no || || || || ||<br />
|-<br />
| setDelayModel || style="background: red;" | no || || || || ||<br />
|-<br />
| getDelayModel || style="background: red;" | no || || || || ||<br />
|-<br />
| rowspan="26" | Model Attributes || get || style="background: green;" | yes || @iddata/get.m || || || ||<br />
|-<br />
| set || style="background: green;" | yes || @iddata/set.m || || || ||<br />
|-<br />
| tfdata || style="background: green;" | yes || @lti/tfdata.m || || || ||<br />
|-<br />
| zpkdata || style="background: green;" | yes || @lti/zpkdata.m || || || ||<br />
|-<br />
| ssdata || style="background: green;" | yes || @lti/ssdata.m || || || ||<br />
|-<br />
| frdata || style="background: green;" | yes || @lti/frdata.m || || || ||<br />
|-<br />
| piddata || style="background: red;" | no || || || || ||<br />
|-<br />
| pidstddata || style="background: red;" | no || || || || ||<br />
|-<br />
| piddata2 || style="background: red;" | no || || || || ||<br />
|-<br />
| pidstddata2 || style="background: red;" | no || || || || ||<br />
|-<br />
| dssdata || style="background: green;" | yes || @lti/dssdata.m || || || ||<br />
|-<br />
| chgFreqUnit || style="background: red;" | no || || || || ||<br />
|-<br />
| chgTimeUnit || style="background: red;" | no || || || || ||<br />
|-<br />
| isct || style="background: green;" | yes || @lti/isct.m || || || ||<br />
|-<br />
| isdt || style="background: green;" | yes || @lti/isdt.m || || || ||<br />
|-<br />
| isempty || style="background: green;" | yes || built-in function || || || ||<br />
|-<br />
| isfinite || style="background: green;" | yes || built-in function || || || ||<br />
|-<br />
| isParametric || style="background: red;" | no || || || || ||<br />
|-<br />
| isproper || style="background: red;" | no || || || || ||<br />
|-<br />
| isreal || style="background: green;" | yes || built-in function || || || ||<br />
|-<br />
| isiso || style="background: red;" | no || || || || ||<br />
|-<br />
| isstable || style="background: green;" | yes || @lti/isstable.m || || || ||<br />
|-<br />
| isstatic || style="background: red;" | no || || || || ||<br />
|-<br />
| order || style="background: red;" | no || || || || ||<br />
|-<br />
| ndims || style="background: green;" | yes || built-in function || || || ||<br />
|-<br />
| size || style="background: green;" | yes || built-in function || || || ||<br />
|-<br />
| rowspan="5" | Model Arrays || stack || style="background: red;" | no || || || || ||<br />
|-<br />
| nmodels || style="background: red;" | no || || || || ||<br />
|-<br />
| permute || style="background: green;" | yes || built-in function || || || ||<br />
|-<br />
| reshape || style="background: green;" | yes || built-in function || || || ||<br />
|-<br />
| repsys || style="background: green;" | yes || repsys.m || || || ||<br />
|-<br />
|}<br />
<br />
=== Model Interconnection ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! Function !! Implemented !! File !! Number of Tests !! Status !! SLICOT functions !! Priority (0-2)<br />
|-<br />
| feedback || style="background: green;" | yes || @lti/feedback.m || || || ||<br />
|-<br />
| connect || style="background: green;" | yes || @lti/connect.m || || || ||<br />
|-<br />
| sumblk || style="background: green;" | yes || sumblk.m || || || ||<br />
|-<br />
| series || style="background: green;" | yes || @lti/series.m || || || ||<br />
|-<br />
| parallel || style="background: green;" | yes || @lti/parallel.m || || || ||<br />
|-<br />
| append || style="background: green;" | yes || append.m || || || ||<br />
|-<br />
| blkdiag || style="background: green;" | yes || @lti/blkdiag.m || || || ||<br />
|-<br />
| imp2exp || style="background: red;" | no || || || || ||<br />
|-<br />
| inv || style="background: green;" | yes || built-in function || || || ||<br />
|-<br />
| lft || style="background: red;" | no || || || || ||<br />
|-<br />
| connectOptions || style="background: red;" | no || || || || ||<br />
|-<br />
|}<br />
<br />
=== Model Transformation ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! Chapter !! Function !! Implemented !! File !! Number of Tests !! Status !! SLICOT functions !! Priority (0-2)<br />
|-<br />
| rowspan="4" | Model Type Conversion || pidstd2 || style="background: red;" | no || || || || ||<br />
|-<br />
| make1DOF || style="background: red;" | no || || || || ||<br />
|-<br />
| make2DOF || style="background: red;" | no || || || || ||<br />
|-<br />
| getComponents || style="background: red;" | no || || || || ||<br />
|-<br />
| rowspan="7" | Continuous-Discrete Conversion || c2d || style="background: green;" | yes || @lti/c2d.m || || || ||<br />
|-<br />
| d2c || style="background: green;" | yes || @lti/d2c.m || || || ||<br />
|-<br />
| d2d || style="background: green;" | yes || @lti/d2d.m || || || ||<br />
|-<br />
| upsample || style="background: red;" | no || || || || ||<br />
|-<br />
| c2dOptions || style="background: red;" | no || || || || ||<br />
|-<br />
| d2cOptions || style="background: red;" | no || || || || ||<br />
|-<br />
| d2dOptions || style="background: red;" | no || || || || ||<br />
|-<br />
| rowspan="9" | Model Simplification || hsvd || style="background: green;" | yes || hsvd.m || || || ||<br />
|-<br />
| hsvplot || style="background: red;" | no || || || || ||<br />
|-<br />
| sminreal || style="background: green;" | yes || @lti/sminreal.m || || || ||<br />
|-<br />
| balred || style="background: red;" | no || || || || ||<br />
|-<br />
| minreal || style="background: green;" | yes || @lti/minreal.m || || || ||<br />
|-<br />
| balreal || style="background: red;" | no || || || || ||<br />
|-<br />
| modred || style="background: red;" | no || || || || ||<br />
|-<br />
| balredOptions || style="background: red;" | no || || || || ||<br />
|-<br />
| hsvdOptions || style="background: red;" | no || || || || ||<br />
|-<br />
| rowspan="4" | State-Coordinate Transformation || canon || style="background: red;" | no || || || || ||<br />
|-<br />
| prescale || style="background: green;" | yes || @lti/prescale.m || || || ||<br />
|-<br />
| ss2ss || style="background: red;" | no || || || || ||<br />
|-<br />
| xperm || style="background: green;" | yes || @lti/xperm.m || || || ||<br />
|-<br />
| rowspan="5" | Modal Decomposition || modsep || style="background: red;" | no || || || || ||<br />
|-<br />
| stabsep || style="background: red;" | no || || || || ||<br />
|-<br />
| freqsep || style="background: red;" | no || || || || ||<br />
|-<br />
| stabsepOptions || style="background: red;" | no || || || || ||<br />
|-<br />
| freqsepOptions || style="background: red;" | no || || || || ||<br />
|-<br />
|}<br />
<br />
=== Linear Analysis ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! Chapter !! Function !! Implemented !! File !! Number of Tests !! Status !! SLICOT functions !! Priority (0-2)<br />
|-<br />
| rowspan="13" | Time-Domain Analysis || linearSystemAnalyzer || style="background: red;" | no || || || || ||<br />
|-<br />
| impulseplot || style="background: red;" | no || || || || ||<br />
|-<br />
| initialplot || style="background: red;" | no || || || || ||<br />
|-<br />
| lsimplot || style="background: red;" | no || || || || ||<br />
|-<br />
| stepplot || style="background: red;" | no || || || || ||<br />
|-<br />
| covar || style="background: green;" | yes || covar.m || || || ||<br />
|-<br />
| impulse || style="background: green;" | yes || impulse.m || || || ||<br />
|-<br />
| initial || style="background: green;" | yes || initial.m || || || ||<br />
|-<br />
| lsim || style="background: green;" | yes || lsim.m || || || ||<br />
|-<br />
| step || style="background: green;" | yes || step.m || || || ||<br />
|-<br />
| lsiminfo || style="background: red;" | no || || || || ||<br />
|-<br />
| stepinfo || style="background: red;" | no || || || || ||<br />
|-<br />
| stepDataOptions || style="background: red;" | no || || || || ||<br />
|-<br />
| rowspan="14" | Frequency-Domain Analysis || bodeplot || style="background: red;" | no || || || || ||<br />
|-<br />
| nicholsplot || style="background: red;" | no || || || || ||<br />
|-<br />
| nyquistplot || style="background: red;" | no || || || || ||<br />
|-<br />
| sigmaplot || style="background: red;" | no || || || || ||<br />
|-<br />
| bode || style="background: green;" | yes || bode.m || || || ||<br />
|-<br />
| nichols || style="background: green;" | yes || nichols.m || || || ||<br />
|-<br />
| nyquist || style="background: green;" | yes || nyquist.m || || || ||<br />
|-<br />
| sigma || style="background: green;" | yes || sigma.m || || || ||<br />
|-<br />
| evalfr || style="background: red;" | no || || || || ||<br />
|-<br />
| freqresp || style="background: green;" | yes || @lti/freqresp.m || || || ||<br />
|-<br />
| bandwidth || style="background: green;" | yes || built-in function || || || ||<br />
|-<br />
| dcgain || style="background: green;" | yes || @lti/dcgain.m || || || ||<br />
|-<br />
| getGainCrossover || style="background: red;" | no || || || || ||<br />
|-<br />
| getPeakGain || style="background: red;" | no || || || || ||<br />
|-<br />
| rowspan="11" | Stability Analysis || pole || style="background: green;" | yes || @lti/pole.m || || || ||<br />
|-<br />
| zero || style="background: green;" | yes || @lti/zero.m || || || ||<br />
|-<br />
| damp || style="background: green;" | yes || damp.m || || || ||<br />
|-<br />
| dsort || style="background: green;" | yes || dsort.m || || || ||<br />
|-<br />
| esort || style="background: green;" | yes || esort.m || || || ||<br />
|-<br />
| tzero || style="background: red;" | no || || || || ||<br />
|-<br />
| pzmap || style="background: green;" | yes || pzmap.m || || || ||<br />
|-<br />
| pzplot || style="background: red;" | no || || || || ||<br />
|-<br />
| iopzplot || style="background: red;" | no || || || || ||<br />
|-<br />
| allmargin || style="background: red;" | no || || || || ||<br />
|-<br />
| margin || style="background: green;" | yes || margin.m || || || ||<br />
|-<br />
| rowspan="11" | Plot Customization || bodeoptions || style="background: red;" | no || || || || ||<br />
|-<br />
| hsvoptions || style="background: red;" | no || || || || ||<br />
|-<br />
| nicholsoptions || style="background: red;" | no || || || || ||<br />
|-<br />
| nyquistoptions || style="background: red;" | no || || || || ||<br />
|-<br />
| pzoptions || style="background: red;" | no || || || || ||<br />
|-<br />
| sigmaoptions || style="background: red;" | no || || || || ||<br />
|-<br />
| timeoptions || style="background: red;" | no || || || || ||<br />
|-<br />
| setoptions || style="background: red;" | no || || || || ||<br />
|-<br />
| getoptions || style="background: red;" | no || || || || ||<br />
|-<br />
| ctrlpref || style="background: red;" | no || || || || ||<br />
|-<br />
| updateSystem || style="background: red;" | no || || || || ||<br />
|-<br />
|}<br />
<br />
=== Control Design ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! Chapter !! Function !! Implemented !! File !! Number of Tests !! Status !! SLICOT functions !! Priority (0-2)<br />
|-<br />
| rowspan="3" | PID Controller Tuning || pidTuner || style="background: red;" | no || || || || ||<br />
|-<br />
| pidtune || style="background: red;" | no || || || || ||<br />
|-<br />
| pidtuneOptions || style="background: red;" | no || || || || ||<br />
|-<br />
| rowspan="5" | SISO Feedback Loops || rlocus || style="background: green;" | yes || rlocus.m || || || ||<br />
|-<br />
| sgrid || style="background: red;" | no || || || || ||<br />
|-<br />
| rlocusplot || style="background: red;" | no || || || || ||<br />
|-<br />
| controlSystemDesigner || style="background: red;" | no || || || || ||<br />
|-<br />
| sisoinit || style="background: red;" | no || || || || ||<br />
|-<br />
| rowspan="12" | Linear-Quadratic-Gaussian Control || lqr || style="background: green;" | yes || lqr.m || || || ||<br />
|-<br />
| lqry || style="background: red;" | no || || || || ||<br />
|-<br />
| lqi || style="background: red;" | no || || || || ||<br />
|-<br />
| dlqr || style="background: green;" | yes || dlqr.m || || || ||<br />
|-<br />
| lqrd || style="background: red;" | no || || || || ||<br />
|-<br />
| kalman || style="background: green;" | yes || kalman.m || || || ||<br />
|-<br />
| kalmd || style="background: red;" | no || || || || ||<br />
|-<br />
| lqg || style="background: red;" | no || || || || ||<br />
|-<br />
| lqgreg || style="background: red;" | no || || || || ||<br />
|-<br />
| lqgtrack || style="background: red;" | no || || || || ||<br />
|-<br />
| augstate || style="background: red;" | no || || || || ||<br />
|-<br />
| norm || style="background: green;" | yes || @lti/norm.m || || || ||<br />
|-<br />
| rowspan="3" | Pole Placement || estim || style="background: green;" | yes || estim.m || || || ||<br />
|-<br />
| place || style="background: green;" | yes || place.m || || || ||<br />
|-<br />
| reg || style="background: red;" | no || || || || ||<br />
|-<br />
|}<br />
<br />
=== Matrix Computations ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! Function !! Implemented !! File !! Number of Tests !! Status !! SLICOT functions !! Priority (0-2)<br />
|-<br />
| lyap || style="background: green;" | yes || lyap.m || || || ||<br />
|-<br />
| lyapchol || style="background: green;" | yes || lyapchol.m || || || ||<br />
|-<br />
| dlyap || style="background: green;" | yes || dlyap.m || || || ||<br />
|-<br />
| dlyapchol || style="background: green;" | yes || dlyapchol.m || || || ||<br />
|-<br />
| care || style="background: green;" | yes || care.m || || || ||<br />
|-<br />
| dare || style="background: green;" | yes || dare.m || || || ||<br />
|-<br />
| gcare || style="background: red;" | no || || || || ||<br />
|-<br />
| gdare || style="background: red;" | no || || || || ||<br />
|-<br />
| ctrb || style="background: green;" | yes || ctrb.m || || || ||<br />
|-<br />
| obsv || style="background: green;" | yes || obsv.m || || || ||<br />
|-<br />
| ctrbf || style="background: green;" | yes || ctrbf.m || || || ||<br />
|-<br />
| obsvf || style="background: green;" | yes || obsvf.m || || || ||<br />
|-<br />
| gram || style="background: green;" | yes || gram.m || || || ||<br />
|-<br />
| bdschur || style="background: red;" | no || || || || ||<br />
|-<br />
|}<br />
<br />
== Examples ==<br />
<br />
=== PT1 / Low-pass filter step response ===<br />
<br />
<!-- {{SyntaxHighlight| --><br />
{{Code|Creating a transfer function and plotting its response|<syntaxhighlight lang="octave" style="font-size:14px"><br />
T1 = 0.4; # time constant<br />
P = tf([1], [T1 1]); # create transfer function model<br />
step(P, 2) # plot step response<br />
<br />
#add some common markers like the tangent line at the origin, which crosses lim(n->inf) f(t) at t=T1<br />
hold on<br />
plot ([0 T1], [0 1], "g")<br />
plot ([T1 T1], [0 1], "k")<br />
plot ([0 T1], [1-1/e 1-1/e], "m")<br />
hold off<br />
</syntaxhighlight>}}<br />
<br />
[[File:Pt1.png|600px]]<br />
<br />
==== Bode Diagram with TikZ/PGFplots ====<br />
<br />
We use the same system as before but we draw now with <code style="font-size:14px; border:solid lightgray 1px; padding: 2px">bode(P)</code> a bode diagram.<br />
The output is written to a .csv file.<br />
<br />
<!-- {{SyntaxHighlight| --><br />
{{Code|Creating a transfer function and calculating its bode diagram|<syntaxhighlight lang="octave" style="font-size:14px"><br />
T1 = 0.4; # time constant<br />
P = tf([1], [T1 1]);<br />
<br />
[mag, pha, w] = bode(P);<br />
<br />
csvwrite("dat/bode_p.csv", [w', 20*log10(mag), pha]);<br />
</syntaxhighlight>}}<br />
<br />
We can then invoke LaTeX with the following .tex file<br />
<br />
<!-- {{SyntaxHighlight| --><br />
{{Code|Creating a bode diagram with pgfplots|<syntaxhighlight lang="latex" style="font-size:14px"><br />
\documentclass[tikz]{standalone}<br />
\usepackage{pgfplotstable}<br />
\usepackage{siunitx}<br />
\usetikzlibrary{pgfplots.groupplots}<br />
<br />
\begin{document}<br />
\pgfplotstableread[col sep=comma]{\detokenize{/path/to/csv/file/dat/bode_p.csv}}\datatable<br />
\begin{tikzpicture}<br />
\begin{groupplot}[<br />
group style={rows=2}, <br />
width=0.8\textwidth,<br />
height=0.4\textwidth, <br />
xmajorgrids, <br />
ymajorgrids, <br />
enlarge x limits=false,<br />
xmode=log,<br />
] <br />
\nextgroupplot[<br />
title={Bode Diagram of $P$},<br />
ylabel={Magnitude / \si{\decibel}},<br />
]<br />
\addplot[blue,line width=1pt] table[x index=0,y index=1]{\datatable}; <br />
\nextgroupplot[<br />
xlabel={Frequency / \si{\radian\per\second}},<br />
ylabel={Phase / \si{\degree}},<br />
] <br />
\addplot[red,line width=1pt] table[x index=0,y index=2]{\datatable};<br />
\end{groupplot}<br />
\end{tikzpicture}<br />
\end{document}<br />
</syntaxhighlight>}}<br />
<br />
to generate a beautiful bode diagram<br />
<br />
[[File:bode_p.png]]<br />
<br />
It can be seen that a first order low-pass filter has <math display="inline">-3\,dB</math> magnitude at <math display="inline">f=1/T_1=2.5\,rad/s</math>.<br />
<br />
=== Inverted Pendulum ===<br />
<br />
==== Model ====<br />
<br />
A nonlinear model of the inverted pendulum can be derived by<br />
<br />
<math><br />
\begin{cases}<br />
(M+m)\ddot{x}+c\dot{x}-ml\cos{\theta}\ddot{\theta}+ml\sin{\theta}\dot{\theta}^2&=f(t)\\<br />
-ml\ddot{x}\cos{\theta}+(ml^2+I)\ddot{\theta}+b\dot{\theta}+mgl\sin{\theta}&=0<br />
\end{cases}\text{,}<br />
</math><br />
<br />
where the variables are defined as<br />
<br />
{|<br />
! align="left" | Name<br />
! align="left" | Definition<br />
|-<br />
|<math display="inline">M</math><br />
|Mass of the cart<br />
|-<br />
|<math display="inline">m</math><br />
|Mass of the pendulum<br />
|-<br />
|<math display="inline">c</math><br />
|Translational damping coefficient<br />
|-<br />
|<math display="inline">l</math><br />
|Length of the pendulum<br />
|-<br />
|<math display="inline">I</math><br />
|Inertia of the pendulum<br />
|-<br />
|<math display="inline">b</math><br />
|Rotational damping coefficient<br />
|}<br />
<br />
[[File:inverted_pendulum_new.png|frame|Schematic drawing of the inverted pendulum.]]<br />
<br />
Linearization around the point <math display="inline">\theta=\pi</math> and substitution of <math display="inline">\theta'=\theta-\pi</math> (from here on in the analysis, <math display="inline">\theta'</math> will be written as <math display="inline">\theta</math>, but it should be noted that <math display="inline">\theta</math> now<br />
measures from a new reference) leads to<br />
<br />
<math><br />
\begin{cases}<br />
(M+m)\ddot{x}+c\dot{x}+ml\ddot{\theta}&=f(t)\\<br />
ml\dot{x}+(ml^2+I)\ddot{\theta}+b\dot{\theta}-mgl\theta&=0<br />
\end{cases}\text{.}<br />
</math><br />
<br />
This can be expressed in the frequency domain like<br />
<br />
<math><br />
\begin{cases}<br />
(M+m)s^2X(s)+csX(s)+mls^2\Theta(s)&=F(s)\\<br />
mlsX(s)+(ml^2+I)s^2\Theta(s)+bs\Theta(s)-mgl\Theta(s)&=0<br />
\end{cases}<br />
</math><br />
<br />
==== Transfer functions ====<br />
<br />
By dividing the state variables by the input one obtains the transfer functions<br />
<br />
<math><br />
\begin{align}<br />
G_1(s)&=\frac{X(s)}{F(s)}=\frac{\alpha_2s^2+\alpha_1s+\alpha_0}{\beta_4s^4+\beta_3s^3+\beta_2s^2+\beta_1s}\\<br />
G_2(s)&=\frac{\Theta(s)}{F(s)}=\frac{\gamma_1s}{\beta_4s^3+\beta_3s^2+\beta_2s+\beta_1}<br />
\end{align}<br />
</math><br />
<br />
with<br />
<br />
{|<br />
|<math display="inline">\alpha_2=ml^2+I</math><br />
|-<br />
|<math display="inline">\alpha_1=b</math><br />
|-<br />
|<math display="inline">\alpha_0=-mgl</math><br />
|-<br />
|<math display="inline">\beta_4=(M+m)(ml^2+I)-m^2l^2</math><br />
|-<br />
|<math display="inline">\beta_3=(M+m)b+(ml^2+I)c</math><br />
|-<br />
|<math display="inline">\beta_2=-(M+m)mgl+bc</math><br />
|-<br />
|<math display="inline">\beta_1=-mglc</math><br />
|-<br />
|<math display="inline">\gamma_1=-ml</math><br />
|}<br />
<br />
This can be expressed in Octave<br />
<br />
<!-- {{SyntaxHighlight| --><br />
{{Code|Creating the transfer functions for the inverted pendulum|<syntaxhighlight lang="octave" style="font-size:14px"><br />
m = 0.15;<br />
l = 0.314;<br />
M = 1.3;<br />
I = 0;<br />
g = 9.80665;<br />
b = 20;<br />
c = 20;<br />
<br />
G1 = tf([m*l^2+I b -m*g*l],<br />
[(M+m)*(m*l^2+I)-m^2*l^2 (M+m)*b+(m*l^2+I)*c -(M+m)*m*g*l+b*c -m*g*l*c 0]);<br />
G2 = tf([-m*l],<br />
[(M+m)*(m*l^2+I)-m^2*l^2 (M+m)*b+(m*l^2+I)*c -(M+m)*m*g*l+b*c -m*g*l*c]);<br />
</syntaxhighlight>}}<br />
<br />
and by invoking the <code style="font-size:14px; border:solid lightgray 1px; padding: 2px">bode</code> command<br />
<br />
<!-- {{SyntaxHighlight| --><br />
{{Code|Creating Bode plots for the inverted pendulum|<syntaxhighlight lang="octave" style="font-size:14px"><br />
bode(G1);<br />
bode(G2);<br />
</syntaxhighlight>}}<br />
<br />
one obtains the bode diagrams of the two transfer functions.<br />
<br />
<div><ul><br />
<li style="display: inline-block;"> [[File:bode_g1.png|frame|Bode diagram of the cart movement transfer function.]] </li><br />
<li style="display: inline-block;"> [[File:bode_g2.png|frame|Bode diagram of the pendulums rotation transfer function.]] </li><br />
</ul></div><br />
<br />
==References==<br />
<references /><br />
<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Bim_package&diff=11751
Bim package
2019-03-12T23:24:47Z
<p>Ricardofantin: Insert Category:Packages</p>
<hr />
<div>Package for solving Diffusion Advection Reaction (DAR) Partial Differential Equations based on the Finite Volume Scharfetter-Gummel (FVSG) method a.k.a Box Integration Method (BIM).<br />
<br />
== Tutorials ==<br />
=== 2D Diffusion Advection Reaction example ===<br />
<br />
This is a short example on how to use <tt>bim</tt> to solve a 2D Diffusion Advection Reaction problem.<br />
<!-- The complete code for this example is on [[Agora]] at this [http://agora.octave.org/snippet/1bqV link] -->.<br />
<br />
We want to solve the equation<br />
<br />
<math> -\mathrm{div}\ ( \varepsilon\ \nabla u(x, y) - \nabla \varphi(x,y)\ u(x, y) ) ) + u(x, y) = 1 \qquad \mbox{ in } \Omega</math><br />
<br />
<math> \varphi(x, y)\ =\ x + y </math><br />
<br />
with mixed Dirichlet / Neumann boundary conditions<br />
<br />
<math> u(x, y) = u_d(x, y)\qquad \mbox{ on } \Gamma_D </math><br />
<br />
<math> -( \varepsilon\ \nabla u(x, y) - \nabla \varphi(x,y)\ u(x, y) ) \cdot \mathbf{n} = j_N(x, y)\qquad \mbox{ on } \Gamma_N</math><br />
<br />
<b> Create the mesh and precompute the mesh properties </b><br />
<br />
To define the geometry of the domain we can use [http://gmsh.geuz.org gmsh].<br />
<br />
the following gmsh input <br />
<br />
<pre><br />
Point (1) = {0, 0, 0, 0.1};<br />
Point (2) = {1, 1, 0, 0.1};<br />
Point (3) = {1, 0.9, 0, 0.1};<br />
Point (4) = {0, 0.1, 0, 0.1};<br />
Point (5) = {0.3,0.1,-0,0.1};<br />
Point (6) = {0.4,0.4,-0,0.1};<br />
Point (7) = {0.5,0.6,0,0.1};<br />
Point (8) = {0.6,0.9,0,0.1};<br />
Point (9) = {0.8,0.8,0,0.1};<br />
Point (10) = {0.2,0.2,-0,0.1};<br />
Point (11) = {0.3,0.5,0,0.1};<br />
Point (12) = {0.4,0.7,0,0.1};<br />
Point (13) = {0.5,1,0,0.1};<br />
Point (14) = {0.8,0.9,0,0.1};<br />
<br />
Line (1) = {3, 2};<br />
Line (2) = {4, 1};<br />
<br />
CatmullRom(3) = {1,5,6,7,8,9,3};<br />
CatmullRom(4) = {4,10,11,12,13,14,2};<br />
Line Loop(15) = {3,1,-4,2};<br />
Plane Surface(16) = {15};<br />
</pre><br />
<br />
will produce the geometry below<br />
<br />
[[File:fiume.png]]<br />
<br />
we need to load the mesh into Octave and precompute mesh properties<br />
check out the tutorial for the [[msh_package|msh package]] for info <br />
on the mesh structure<br />
<br />
{{Code|Meshing the 2D problem|<syntaxhighlight lang="octave" style="font-size:13px"><br />
[mesh] = msh2m_gmsh ("fiume","scale",1,"clscale",.1);<br />
[mesh] = bim2c_mesh_properties (mesh);<br />
</syntaxhighlight>}}<br />
<br />
to see the mesh you can use functions from the [[fpl_package|fpl package]]<br />
<br />
{{Code|Visualizing the mesh for the 2D problem|<syntaxhighlight lang="octave" style="font-size:13px"><br />
pdemesh (mesh.p, mesh.e, mesh.t)<br />
view (2)<br />
</syntaxhighlight>}} <br />
<br />
[[File:fiume_msh.png]]<br />
<br />
<br />
<b> Set the coefficients for the problem:</b><br />
<br />
Get the node coordinates from the mesh structure<br />
<br />
{{Code|Get mesh coordinates in the 2D problem|<syntaxhighlight lang="octave" style="font-size:13px"><br />
xu = mesh.p(1,:).';<br />
yu = mesh.p(2,:).';<br />
</syntaxhighlight><br />
}}<br />
<br />
<br />
Get the number of elements and nodes in the mesh<br />
<br />
{{Code|Get number of elements in the 2D problem|<syntaxhighlight lang="octave" style="font-size:13px"><br />
nelems = columns (mesh.t);<br />
nnodes = columns (mesh.p);<br />
</syntaxhighlight>}} <br />
<br />
{{Code|Set value of coefficients for the 2D problem|<syntaxhighlight lang="octave" style="font-size:13px"><br />
epsilon = .1;<br />
phi = xu + yu;<br />
</syntaxhighlight>}} <br />
<br />
<b> Construct the discretized operators</b><br />
<br />
{{Code|Discretized operators for the 2D problem|<syntaxhighlight lang="octave" style="font-size:13px"> <br />
AdvDiff = bim2a_advection_diffusion (mesh, epsilon, 1, 1, phi);<br />
Mass = bim2a_reaction (mesh, 1, 1);<br />
b = bim2a_rhs (mesh,f,g);<br />
A = AdvDiff + Mass;<br />
</syntaxhighlight>}}<br />
<br />
<b> To Apply Boundary Conditions, partition LHS and RHS</b><br />
<br />
The tags of the sides are assigned by gmsh we let <math> \Gamma_D </math> be composed by sides 1 and 2<br />
and <math> \Gamma_D </math> be the rest of the boundary<br />
<br />
{{Code|Boundary conditions for the 2D problem|<syntaxhighlight lang="octave" style="font-size:13px"> <br />
GammaD = bim2c_unknowns_on_side (mesh, [1 2]); ## DIRICHLET NODES LIST<br />
GammaN = bim2c_unknowns_on_side (mesh, [3 4]); ## NEUMANN NODES LIST<br />
GammaN = setdiff (GammaN, GammaD);<br />
<br />
jn = zeros (length (GammaN),1); ## PRESCRIBED NEUMANN FLUXES<br />
ud = 3*xu; ## DIRICHLET DATUM<br />
Omega = setdiff (1:nnodes, union (GammaD, GammaN)); ## INTERIOR NODES LIST<br />
<br />
Add = A(GammaD, GammaD);<br />
Adn = A(GammaD, GammaN); ## shoud be all zeros hopefully!!<br />
Adi = A(GammaD, Omega); <br />
<br />
And = A(GammaN, GammaD); ## shoud be all zeros hopefully!!<br />
Ann = A(GammaN, GammaN);<br />
Ani = A(GammaN, Omega); <br />
<br />
Aid = A(Omega, GammaD);<br />
Ain = A(Omega, GammaN); <br />
Aii = A(Omega, Omega); <br />
<br />
bd = b(GammaD);<br />
bn = b(GammaN); <br />
bi = b(Omega); <br />
</syntaxhighlight>}}<br />
<br />
<br />
<B> Solve for the tracer density</B><br />
<br />
{{Code|Compute solution of the 2D problem|<syntaxhighlight lang="octave" style="font-size:13px"> <br />
temp = [Ann Ani ; Ain Aii ] \ [ jn+bn-And*ud(GammaD) ; bi-Aid*ud(GammaD)];<br />
u = ud;<br />
u(GammaN) = temp(1:numel (GammaN));<br />
u(Omega) = temp(length(GammaN)+1:end);<br />
</syntaxhighlight>}}<br />
<br />
<b> Compute the fluxes through Dirichlet sides</b><br><br />
<br />
{{Code|Boundary fluxes in the 2D problem|<syntaxhighlight lang="octave" style="font-size:13px"> <br />
jd = [Add Adi Adn] * u([GammaD; Omega; GammaN]) - bd;<br />
</syntaxhighlight>}}<br />
<br />
<br />
<B> Compute the gradient of the solution </B><br />
<br />
{{Code|Gradient of solution in the 2D problem|<syntaxhighlight lang="octave" style="font-size:13px"> <br />
[gx, gy] = bim2c_pde_gradient (mesh, u);<br />
</syntaxhighlight>}}<br />
<br />
<B> Compute the internal Advection-Diffusion flux</B><br />
<br />
{{Code|Total flux for the 2D problem|<syntaxhighlight lang="octave" style="font-size:13px"><br />
[jxglob, jyglob] = bim2c_global_flux (mesh, u, epsilon*ones(nelems, 1), ones(nnodes, 1), ones(nnodes, 1), phi);<br />
</syntaxhighlight>}}<br />
<br />
<B> Export data to VTK format</B><br />
<br />
The resut can be exported to vtk format to visualize with [[http://www.paraview.org|paraview]] <br />
or [[https://wci.llnl.gov/codes/visit/|visit]]<br />
<br />
{{Code|Export the solution of the 2D problem to vtk|<syntaxhighlight lang="octave" style="font-size:13px"><br />
fpl_vtk_write_field ("vtkdata", mesh, {u, "Solution"}, {[gx; gy]', "Gradient"}, 1);<br />
</syntaxhighlight>}}<br />
<br />
you can also plot your data directly in Octave using <code> pdesurf </code><br />
<br />
{{Code|Rubbersheet visualization of the solution of the 2D problem|<syntaxhighlight lang="octave" style="font-size:13px"><br />
pdesurf (mesh.p, mesh.t, u)<br />
</syntaxhighlight>}}<br />
<br />
it will look like this<br />
<br />
[[File:fiume_sol_pdesurf.png|500px]]<br />
<br />
=== 3D Time dependent problem ===<br />
<br />
Here is an example of a 3D time-dependent Advection-Diffusion equation that uses <code> lsode </code> for time-stepping.<br />
<br />
The equation being solved is<br />
<br />
<math> \frac{\partial u}{\partial t} - \mathrm{div } \left(.01 \nabla u - u \nabla \varphi \right) <br />
= 0 \qquad \mbox{ in } \Omega \times [0, T] =[0, 1]^3 \times [0, 1] </math><br />
<br />
<math> ~\varphi = x + y - z </math><br />
<br />
<math> - \left(.01 \nabla u - u \nabla \varphi \right) \cdot \mathbf{n} = 0 <br />
\qquad \mbox{ on } \partial \Omega</math><br />
<br />
The initial condition is<br />
<br />
<math> u = \exp (- \left(\frac{x-.2}{.2}\right)^2 - \left(\frac{y-.2}{.2}\right)^2 - \left(\frac{z-.2}{.2}\right)^2)</math><br />
<br />
{{Code|Define the 3D problem|<syntaxhighlight lang="octave" style="font-size:13px"> <br />
pkg load bim<br />
<br />
x = linspace (0, 1, 40);<br />
y = z = linspace (0, 1, 20);<br />
msh = bim3c_mesh_properties (msh3m_structured_mesh (x, y, z, 1, 1:6));<br />
nn = columns (msh.p);<br />
ne = columns (msh.t);<br />
<br />
x = msh.p(1, :).';<br />
y = msh.p(2, :).';<br />
z = msh.p(3, :).';<br />
<br />
x0 = .2; sx = .1;<br />
y0 = .2; sy = .1;<br />
z0 = .8; sz = .1;<br />
<br />
u = exp (- ((x-x0)/(2*sx)) .^2 - ((y-y0)/(2*sy)) .^2 - ((z-z0)/(2*sz)) .^2);<br />
<br />
A = bim3a_advection_diffusion (msh, .01*ones(ne, 1), 100*(x+y-z));<br />
M = bim3a_reaction (msh, 1, 1);<br />
<br />
function du = f (u, t, A, M)<br />
du = - M \ (A * u);<br />
endfunction <br />
<br />
time = linspace (0, 1, 30);<br />
lsode_options ("integration method", "adams");<br />
U = lsode (@(u, t) f(u, t, A, M), u, time);<br />
<br />
for ii = 1:1:numel (time)<br />
name = sprintf ("u_%3.3d", ii);<br />
delete ([name ".vtu"]);<br />
fpl_vtk_write_field (name, msh, {U(ii,:)', 'u'}, {}, 1);<br />
endfor<br />
</syntaxhighlight>}}<br />
<br />
[http://youtu.be/2E6Z_AcV8CQ This is a video] showing the .3 isosurface of the solution.<br />
<br />
== External links ==<br />
* [http://octave.sourceforge.net/bim/index.html BIM package at Octave Forge].<br />
<br />
[[Category:Octave Forge]][[Category:Packages]]<br />
<br />
== Scientific papers using BIM ==<br />
<br />
* [https://doi.org/10.1016/j.jcp.2004.10.029 de Falco, C., Gatti, E., Lacaita, A. L., & Sacco, R. (2005). Quantum-corrected drift-diffusion models for transport in semiconductor devices. Journal of Computational Physics, 204(2), 533-561.]<br />
<br />
* [https://doi.org/10.1016/j.jcp.2008.11.010 de Falco, C., Jerome, J.W. and Sacco, R., 2009. Quantum-corrected drift-diffusion models: Solution fixed point map and finite element approximation. Journal of Computational Physics, 228(5), pp.1770-1789.]<br />
<br />
* [http://www.math.ualberta.ca/ijnam/Volume-7-2010/No-3-10/2010-03-04.pdf de Falco, C. and O'riordan, E., 2010. INTERIOR LAYERS IN A REACTION DIFFUSION EQUATION WITH A DISCONTINUOUS DIFFUSION COEFFICIENT. International Journal of Numerical Analysis & Modeling, 7(3).]<br />
<br />
* [https://doi.org/10.1016/j.cma.2010.01.018 de Falco, C., Sacco, R. and Verri, M., 2010. Analytical and numerical study of photocurrent transients in organic polymer solar cells. Computer Methods in Applied Mechanics and Engineering, 199(25), pp.1722-1732.]<br />
<br />
* [https://doi.org/10.1016/j.cma.2012.06.018 de Falco, C., Porro, M., Sacco, R. and Verri, M., 2012. Multiscale modeling and simulation of organic solar cells. Computer Methods in Applied Mechanics and Engineering, 245, pp.102-116.]<br />
<br />
* [http://link.springer.com/chapter/10.1007/978-3-540-71980-9_5 de Falco, C., Denk, G. and Schultz, R., 2007. A demonstrator platform for coupled multiscale simulation. In Scientific Computing in Electrical Engineering (pp. 63-71). Springer Berlin Heidelberg.]<br />
<br />
* [https://doi.org/10.1016/j.orgel.2014.12.001 Maddalena, F., de Falco, C., Caironi, M. and Natali, D., 2015. Assessing the width of Gaussian density of states in organic semiconductors. Organic Electronics, 17, pp.304-318.]<br />
<br />
* [http://link.springer.com/chapter/10.1007/978-3-642-12294-1_35 Alì, G., Bartel, A., Culpo, M. and de Falco, C., 2010. Analysis of a PDE thermal element model for electrothermal circuit simulation. In Scientific Computing in Electrical Engineering SCEE 2008 (pp. 273-280). Springer Berlin Heidelberg.]<br />
<br />
* [http://onlinelibrary.wiley.com/doi/10.1002/pamm.200810065/full Culpo, M. and De Falco, C., 2008. Dynamical iteration schemes for coupled simulation in nanoelectronics. PAMM, 8(1), pp.10065-10068.]<br />
<br />
* [https://doi.org/10.1108/COMPEL-12-2012-0365 Porro, M., de Falco, C., Verri, M., Lanzani, G. and Sacco, R., 2014. Multiscale simulation of organic heterojunction light harvesting devices. COMPEL: The International Journal for Computation and Mathematics in Electrical and Electronic Engineering, 33(4), pp.1107-1122.]<br />
<br />
* [http://dx.doi.org/10.1063/1.4709483 Ciucci, F., de Falco, C., Guzman, M.I., Lee, S. and Honda, T., 2012. Chemisorption on semiconductors: The role of quantum corrections on the space charge regions in multiple dimensions. Applied Physics Letters, 100(18), p.183106.]<br />
<br />
* [https://link.springer.com/chapter/10.1007%2F978-3-642-12294-1_36 Culpo, M., de Falco, C., Denk, G. and Voigtmann, S., 2010. Automatic thermal network extraction and multiscale electro-thermal simulation. In Scientific Computing in Electrical Engineering SCEE 2008 (pp. 281-288). Springer Berlin Heidelberg.]<br />
<br />
* [https://link.springer.com/chapter/10.1007/978-3-642-12110-4_33 Culpo, M., de Falco, C. and O’Riordan, E., 2010. Patches of finite elements for singularly-perturbed diffusion reaction equations with discontinuous coefficients. In Progress in Industrial Mathematics at ECMI 2008 (pp. 235-240). Springer Berlin Heidelberg.]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Summer_of_Code_-_Getting_Started&diff=11750
Summer of Code - Getting Started
2019-03-12T16:00:01Z
<p>Ricardofantin: Update mentor name</p>
<hr />
<div>The following is distilled from the [[Projects]] page for the benefit of potential [https://summerofcode.withgoogle.com Google] and [http://sophia.estec.esa.int/socis ESA] Summer of Code (SoC) students. Although students are welcome to attempt any of the projects in that page or any of their own choosing, here we offer some suggestions on what good student projects might be.<br />
<br />
You can also take a look at last years [[Summer of Code]] projects for inspiration.<br />
<br />
= Steps Toward a Successful Application =<br />
<br />
== Help Us Get To Know You == <br />
*: If you aren't communicating with us before the application is due, your application will not be accepted.<br />
*:* '''Join the [https://lists.gnu.org/mailman/listinfo/octave-maintainers maintainers mailing list]''' or read the archives and see what topics we discuss and how the developers interact with each other.<br />
*:* '''Hang out in our [https://webchat.freenode.net/?channels=#octave IRC channel]'''. Ask questions, answer questions from users, show us that you are motivated, and well-prepared. There will be more applicants than we can effectively mentor, so do ask for feedback on your public application to increase the strength of your proposal!<br />
* '''Do not wait for us to tell you what to do'''<br />
*: You should be doing something that interests you, and should not need us to tell you what to do. Similarly, you shouldn't ask us what to do either.<br />
*:* When you email the list and mentors, do not write it to say in what project you're interested. Be specific about your questions and clear on the email subject. For example, do not write an email with the subject "GSoC student interested in the ND images projects". Such email is likely be ignored. Instead, show you are already working on the topic, and email "Problem implementing morphological operators with bitpacked ND images".<br />
*:* It is good to ask advice on how to solve something you can't but you must show some work done. Remember, we are mentors and not your boss. Read [http://www.catb.org/esr/faqs/smart-questions.html How to ask questions the smart way]:<br />
*:*: <blockquote cite="http://www.catb.org/esr/faqs/smart-questions.html">''Prepare your question. Think it through. Hasty-sounding questions get hasty answers, or none at all. The more you do to demonstrate that having put thought and effort into solving your problem before seeking help, the more likely you are to actually get help.''</blockquote><br />
*:* It can be difficult at the beginning to think on something to do. This is nature of free and open source software development. You will need to break the mental barrier that prevents you from thinking on what can be done. Once you do that, you will have no lack of ideas for what to do next.<br />
*:* Use Octave. Eventually you will come across something that does not work the way you like. Fix that. Or you will come across a missing function. Implement it. It may be a hard problem (they usually are). While solving that problem, you may find other missing capabilities or smaller bug fixes. Implement and contribute those to Octave.<br />
*:* Take a look at the [[Short projects]] for something that may be simple to start with.<br />
<br />
== Find Something That Interests You == <br />
*: It's '''critical''' that you '''find a project that excites you'''. You'll be spending most of the summer working on it (we expect you to treat the SoC as a full-time job).<br />
*: Don't just tell us how interested you are, show us that you're willing and able to '''contribute''' to Octave. You can do that by [https://savannah.gnu.org/bugs/?group=octave fixing a few bugs] or [http://savannah.gnu.org/patch/?group=octave submitting patches] well before the deadline, in addition to regularly interacting with Octave maintainers and users on the mailing list and IRC. Our experience shows us that successful SoC students demonstrate their interest early and often.<br />
== Prepare Your Proposal With Us ==<br />
*: By working with us to prepare your proposal, you'll be getting to know us and showing us how you approach problems. The best place for this is your Wiki user page and the [https://webchat.freenode.net/?channels=#octave IRC channel].<br />
== Complete Your Application ==<br />
*: Fill out our '''''public''''' application template.<br />
*:* This is best done by '''[[Special:CreateAccount|creating an account at this wiki]]''', and copying the '''[[Template:Student_application_template_public|template]]''' from its page.<br />
*:* You really only need to copy and answer the '''''public''''' part there, there is no need to showcase everything else to everybody reading your user page!<br />
*: Fill out our '''''private''''' application template.<br />
*:* This is best done by copying the '''[[Template:Student_application_template_private|template]]''' from its page and '''adding the required information to your application at Google (melange)''' or at '''ESA'''.<br><br />
*:* Only the organization admin and the possible mentors will see this data. You can still edit it after submitting until the deadline!<br />
<br />
== Things You'll be Expected to Know or Quickly Learn On Your Own ==<br />
<br />
Octave is mostly written in C++ and its own scripting language that is mostly compatible with Matlab. There are bits and pieces of Fortran, Perl, C, awk, and Unix shell scripts here and there. In addition to being familiar with C++ and Octave's scripting language, successful applicants will be familiar with or able to quickly learn about Octave's infrastructure. You can't spend the whole summer learning how to build Octave or prepare a changeset and still successfully complete your project.<br />
<br />
* '''The Build System'''<br />
*: [http://en.wikipedia.org/wiki/GNU_build_system The GNU build system] is used to build Octave.<br />
*: While you generally don't need to understand too much unless you actually want to change how Octave is built, you should be able to understand enough to get a general idea of how to build Octave.<br />
*: If you've ever done a {{Codeline|configure && make && make install}} series of commands, you have already used the GNU build system.<br />
*: '''You must demonstrate that you are able to build the development version of Octave from sources before the application deadline.''' Linux is arguably the easiest system to work on. Instructions:<br />
*:* [[Building]]<br />
*:* [https://www.gnu.org/software/octave/doc/interpreter/Installation.html Octave Manual on Installing Octave]<br />
* '''The Version Control System'''<br />
*: We use [https://www.mercurial-scm.org/ Mercurial] (abbreviated hg).<br />
*: Mercurial is the [http://en.wikipedia.org/wiki/Distributed_Version_Control_System distributed version control system] (DVCS) we use for managing our source code. You should have some basic understanding of how a DVCS works, but hg is pretty easy to pick up, especially if you already know a VCS like git or svn.<br />
* '''The Procedure for Contributing Changesets'''<br />
*: You will be expected to follow the same procedures as other contributors and core developers.<br />
*: You will be helping current and future Octave developers by using our standard style for changes, commit messages, and so on. You should also read the same [[Contribution guidelines | contribution]] [http://hg.savannah.gnu.org/hgweb/octave/file/tip/etc/HACKING.md guidelines] we have for everyone.<br />
*: [[Hg_instructions_for_mentors#Mercurial_Tips_for_SoC_students | This page]] describes the procedures students are expected to use to publicly display their progress in a public mercurial repo during their work.<br />
* '''The Maintainers Mailing List'''<br />
*: We primarily use [https://lists.gnu.org/mailman/listinfo/octave-maintainers mailing lists] for communication among developers.<br />
*: The mailing list is used most often for discussions about non-trivial changes to Octave, or for setting the direction of development.<br />
*: You should follow basic mailing list etiquette. For us, this mostly means "do not [https://en.wikipedia.org/wiki/Posting_style#Top-posting top post]".<br />
* '''The IRC Channel'''<br />
*: We also have [http://webchat.freenode.net?channels=octave the #octave IRC channel in Freenode].<br />
*: You should be familiar with the IRC channel. It's very helpful for new contributors (you) to get immediate feedback on ideas and code.<br />
*: Unless your primary mentor has a strong preference for some other method of communication, the IRC channel will likely be your primary means of communicating with your mentor and Octave developers.<br />
* '''The Octave Forge Project'''<br />
*: [https://octave.sourceforge.io/ Octave-Forge] is a collection of contributed packages that enhance the capabilities of core Octave. They are somewhat analogous to Matlab's toolboxes.<br />
* '''Related Skills'''<br />
*: In addition, you probably should know '''some''' mathematics, engineering, experimental science, or something of the sort.<br />
*: If so, you probably have already been exposed to the kinds of problems that Octave is used for.<br />
<br />
== Criteria by which applications are judged ==<br />
<br />
These might vary somewhat depending on the mentors and coordinators for a particular Summer of Code, but typically the main factors considered would be:<br />
<br />
* '''Applicant has demonstrated an ability to make substantial modifications to Octave'''<br />
*: The most important thing is that you've contributed some interesting code samples to judge you by. It's OK during the application period to ask for help on how to format these code samples, which normally are Mercurial patches.<br />
<br />
* '''Applicant shows understanding of topic'''<br />
*: Your application should make it clear that you're reasonably well versed in the subject area and won't need all summer just to read up on it.<br />
<br />
* '''Applicant shows understanding of and interest in Octave development'''<br />
*: The best evidence for this is previous contributions and interactions.<br />
<br />
* '''Well thought out, adequately detailed, realistic project plan'''<br />
*: "I'm good at this, so trust me" isn't enough. You should describe which algorithms you'll use and how you'll integrate with existing Octave code. You should also prepare a full timeline and goals for the midterm and final evaluations.<br />
<br />
= Suggested projects =<br />
<br />
The following projects are broadly grouped by category and probable skills required to tackle each. Remember to check [[Projects]] for more ideas if none of these suit you, and your own ideas are always welcome.<br />
<br />
{{Note|these are suggested projects but you are welcome to propose your own projects provided you find an Octave mentor}}<br />
<br />
== Summary table ==<br />
<br />
{| class="wikitable sortable" style="text-align: center; width:99%"<br />
|-<br />
!Title<br />
!Mentor<br />
!co-Mentors<br />
!Class<br />
!New?<br />
!Difficulty<br />
!Last active<br />
|-<br />
! <br />!! !! !! !! !! !!<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#ode15s_:_Matlab_Compatible_DAE_solver | ode15{i,s} : Matlab Compatible DAE solvers]] || Carlo de Falco || Francesco Faccio, Marco Caliari, Jacopo Corno, Sebastian Schöps || Numerical || No || Medium || GSoC 2016<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#Improve_logm.2C_sqrtm.2C_funm | Improve logm, sqrtm, funm]] || ? || Marco Caliari, Mudit Sharma || Numerical || [https://github.com/RickOne16/matrix No] || Hard || Independent devs 2016<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#Improve_iterative_methods_for_sparse_linear_systems | Improve iterative methods for sparse linear systems]] || Marco Caliari || Carlo de Falco || Numerical || No || Hard || SOCIS 2016<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#EPA_hydrology_software_suite | EPA hydrology software suite]] || [[User:KaKiLa| KaKiLa]] || ? || Octave Forge || Yes || Medium || Never<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#FullSWOF overland flow simulator | FullSWOF overland flow simulator]] || [[User:KaKiLa| KaKiLa]] || ? || Octave Forge || Yes || Medium || Never<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#TISEAN_package | TISEAN: Nonlinear Time Series Analysis]] || [[User:KaKiLa|KaKiLa]] || ? || Octave Forge || [[TISEAN_package | No]] || Medium || GSoC 2015<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#Octave_Package_management | Octave Package management]] || Sebastian Schöps || [[User:KaKiLa|KaKiLa]], Carnë Draug, Carlo de Falco || Infrastructure || Yes || Medium || Never<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#Symbolic_package | Symbolic package]] || Colin B. Macdonald || Mike Miller, Abhinav Tripathi || Octave Forge || [https://github.com/cbm755/octsympy Octsympy] || Medium || GSoC 2016<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#Interval_package | Interval package]] || [[User:oheim|Oliver Heimlich]] || [[User:Siko1056|Kai T. Ohlhus]] || Octave Forge, Numerical || No || Medium || [https://gsocinterval.blogspot.de/ GSoC 2017]<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#OCS | OCS package]] || Sebastian Schöps || Sebastian Schöps || Octave Forge, Numerical || Yes || Easy || Never<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#Using_Python_within_Octave | Pytave project]] || Mike Miller || Colin B. Macdonald, Abhinav Tripathi || Infrastructure || No || Medium || some in GSoC 2016<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#Jupyter_Integration | Jupyter integration]] || Mike Miller || Colin B. Macdonald, Ankit Raj || Infrastructure || Yes || Medium || Never<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#Chebfun_in_Octave | Chebfun in Octave]] || Colin B. Macdonald || [[User:KaKiLa|KaKiLa]], Ankit Raj, needs core-Octave mentor/comentor || Infrastructure, Numerical || Yes || Hard || Never<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#GUI Variable Editor and Property Inspector | GUI Property Inspector]] || ? || || GUI || Yes || Medium || Never<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#SPQR Interface | Write API to SPQR Library]] || ? || || Infrastructure || Yes || Medium || Never<br />
|-<br />
| [[Summer_of_Code_Project_Ideas#PolarAxes and Plotting Improvements | PolarAxes and Plotting Improvements ]] || ? || Rik || Graphics || Yes || Medium || Never<br />
|}<br />
<br />
== Numerical ==<br />
<br />
These projects involve implementing certain mathematical functions, primarily in core Octave.<br />
<br />
=== ode15{i,s} : Matlab Compatible DAE solvers ===<br />
<br />
An initial implementation of a Matlab compatible ode15{i,s} solver,<br />
based on [http://computation.llnl.gov/projects/sundials SUNDIALS], <br />
was done by Francesco Faccio during<br />
GSOC 2016.<br />
The blog describing the work is [http://gsoc2016ode15s.blogspot.it/ here].<br />
The resulting code has been pushed into the main Octave repository in the development branch and<br />
consists mainly of the following three files<br />
[http://hg.savannah.gnu.org/hgweb/octave/file/4890b1c4a6bd/libinterp/dldfcn/__ode15__.cc __ode15__.cc],<br />
[http://hg.savannah.gnu.org/hgweb/octave/file/4890b1c4a6bd/scripts/ode/ode15i.m ode15i.m] and<br />
[http://hg.savannah.gnu.org/hgweb/octave/file/4890b1c4a6bd/scripts/ode/ode15s.m ode15s.m].<br />
The list of outstanding tracker tickets concerning this implementation can be found <br />
[https://savannah.gnu.org/search/?Search=Search&words=ode15&type_of_search=bugs&only_group_id=1925&exact=1&max_rows=25#options here]<br />
<br />
Possible useful improvements that could be done in a new project include:<br />
<br />
* Implement a better function for selecting consistent initial conditions compatible with Matlab's decic.m. The algorithm to use is described [http://faculty.smu.edu/shampine/cic.pdf here]<br />
<br />
* make ode15{i,s} with datatypes other than double<br />
<br />
* improve interpolation at intermediate time steps.<br />
<br />
* general code profiling and optimization <br />
<br />
Other tasks, not strictly connected to ode15{i,s} but closely related that could be added <br />
to a possible project plan would be improving documentation and tests in odepkg and removing <br />
overlaps with the documentation in core Octave.<br />
<br />
* '''Required skills'''<br />
: C++; C; familiarity with numerical methods for DAEs; Basic knowledge of makefiles and/or autotools.<br />
* '''Difficulty'''<br />
: Medium.<br />
* '''Potential mentors'''<br />
: Francesco Faccio, Carlo de Falco, Marco Caliari, Jacopo Corno, Sebastian Schöps<br />
<br />
=== Improve logm, sqrtm, funm ===<br />
<br />
The goal here is to implement some missing Matlab functions related to matrix functions like the [http://en.wikipedia.org/wiki/Matrix_exponential matrix exponential]. There is [http://octave.1599824.n4.nabble.com/matrix-functions-td3137935.html a general discussion] of the problem. A good starting point for available algorithms and open-source implementations is Higham and Deadman's [http://eprints.ma.man.ac.uk/2102/01/covered/MIMS_ep2014_8.pdf "A Catalogue of Software for Matrix Functions"].<br />
<br />
* '''Required skills'''<br />
: Read and Write both C++ and Octave code, find and read research papers, research experience in numerical analysis, familiarity with analysis of algorithms.<br />
* '''Difficulty'''<br />
: Difficult.<br />
* '''Potential mentors'''<br />
: ?<br />
<br />
=== Improve iterative methods for sparse linear systems ===<br />
<br />
GNU Octave currently has the following Krylov subspace methods for sparse linear systems: pcg (spd matrices) and pcr (Hermitian matrices), bicg,<br />
bicgstab, cgs, gmres, and qmr (general matrices). The description of some of them (pcr, qmr) and their error messages are not aligned. Moreover, they have similar blocks of code (input check for instance) which can be written once and for all in common functions. The first step in this project could be a revision and a synchronization of the codes, starting from the project [http://planet.octave.org/#tag:blogger.com,1999:blog-1297699247151766814.post-8054019978706480250 SOCIS2016], whose latest patch, still to be included, is [https://savannah.gnu.org/patch/?9108 here].<br />
<br />
In Matlab, some additional methods are available: minres and symmlq (symmetric matrices), bicgstabl (general matrices), lsqr (least<br />
squares). The second step in this project could be the implementation of some of these missing functions.<br />
<br />
The reference book is available [www-users.cs.umn.edu/~saad/IterMethBook_2ndEd.pdf here]<br />
<br />
* '''Required skills'''<br />
: numerical linear algebra, m-file programming.<br />
* '''Difficulty'''<br />
: Maybe hard the mathematical part, medium the programming part.<br />
* '''Mentor'''<br />
:<br />
<br />
=== Chebfun in Octave ===<br />
<br />
[http://chebfun.org Chebfun] is a mathematics and software project for "numerical computing with functions". Basically it approximates functions to machine precision accuracy (10<sup>-15</sup>) using piecewise Chebyshev polynomial interpolants. Operations on those functions (arithmetic, derivatives, root-finding, etc) are then overloaded and return new interpolating polynomials, which are themselves proxies for the actual solution.<br />
<br />
Chebfun makes extensive use of classdef classes, and is one of the largest Free Software projects to do so. Unfortunately it currently only works in Matlab. This project seeks to (1) improve Octave's classdef support and (2) tweak Chebfun to work under Octave, for example, removing undocumented classdef features. The final goal is to have at least basic Chebfun features working on Octave. An additional goal would be making "pkg install chebfun.zip" work in Octave.<br />
<br />
The impact of this project is improving Octave and allowing Chebfun to be used without proprietary software.<br />
<br />
* '''Required skills'''<br />
: Octave m-file programming, classdef programming, probably C++, some familiarity with Approximation Theory (a branch of mathematics).<br />
* '''Difficulty'''<br />
: Medium (fixing Octave classdef bugs likely harder and requires a deep dive into how Octave supports OOP).<br />
* '''Potential mentors'''<br />
: Colin B. Macdonald, [[User:KaKiLa|KaKiLa]], Mike Miller (?), Carnë Draug (?), someone from Chebfun team (?).<br />
<br />
How to get started: learn about Chebfun, browse Octave's bug list for classdef-related bugs.<br />
<br />
First steps: clone this Chebfun [https://github.com/cbm755/chebfun/tree/octave_dev octave_dev branch]. On that, "f = chebfun(@(x) sin(x), [-2 6])" should work with Octave 4.3.0+ and maybe even with 4.2.1. Check that "f(pi)" and "g = f + 1" work. A good first task would be to study [https://github.com/cbm755/chebfun/commit/e20b0ad2dc89cfe8e50ba461b864eff7d5bbef17 this commit], a workaround for "f.funs{1}" using "temp = f.funs; temp{1}". "2*f" is failing, can you fix it, perhaps with this workaround? Or can you make "f.funs{1}" work by changing something in "@chebfun/subsref.m"?<br />
<br />
== Adding functionality to Forge packages ==<br />
<br />
<br />
=== EPA hydrology software suite ===<br />
Create native interfaces to the EPA software suites.<br />
<br />
Starting points<br />
* [https://forja.cica.es/projects/epanet-octave/ epanet-octave].<br />
* [https://github.com/OpenWaterAnalytics/ Open Water Analytics]<br />
<br />
* '''SWMM'''<br />
** [https://www.epa.gov/water-research/storm-water-management-model-swmm Official page]<br />
** Check work done in [https://github.com/water-systems/MatSWMM MatSWMM] [http://digital.csic.es/bitstream/10261/132982/1/MatSWMM.pdf article]<br />
<br />
* '''EPANET'''<br />
** [https://www.epa.gov/water-research/epanet Official page]<br />
<br />
* '''Required skills'''<br />
: m-file scripting, C, C++, API knowledge, file I/O, classdef (optional). <br />
<br />
* '''Difficulty'''<br />
: easy/medium<br />
<br />
* '''Mentor'''<br />
: [[User:KaKiLa|KaKiLa]]<br />
<br />
=== FullSWOF overland flow simulator ===<br />
Create scripting tools for (optional: native interfaces).<br />
<br />
Starting points<br />
* [http://www.univ-orleans.fr/mapmo/soft/FullSWOF/ The FullSWOF Project].<br />
* [https://arxiv.org/abs/1204.3210 FullSWOF: A software for overland flow simulation]<br />
* [https://bitbucket.org/binello7/fswof2d Initial work on Bitbucket]<br />
<br />
* '''Required skills'''<br />
: m-file scripting, C, C++, API knowledge, file I/O, classdef (optional). <br />
<br />
* '''Difficulty'''<br />
: easy/medium<br />
<br />
* '''Mentor'''<br />
: [[User:KaKiLa|KaKiLa]]<br />
<br />
=== TISEAN package ===<br />
<br />
[http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/index.html TISEAN] is a suite of code for nonlinear time series analysis. It has been [[TISEAN package | partially re-implemented]] as libre software. The objective is to integrate TISEAN as an Octave Forge package, as was done for the Control package.<br />
[[TISEAN_package | A lot has been completed]] but [[TISEAN_package:Procedure | there is still work left to do]].<br />
<br />
There are missing functions to do computations on spike trains, to simulate autoregresive models, to create specialized plots, etc. Do check [[TISEAN_package:Procedure#Table_of_functions|the progress of the project]] to see if you are interested.<br />
<br />
* [http://octave.sourceforge.net/tisean/overview.html Package help at source forge.] <br />
* [https://sourceforge.net/p/octave/tisean/ci/default/tree/ Package repository at source forge.] <br />
<br />
* '''Required skills'''<br />
: m-file scripting, C, C++, and FORTRAN API knowledge. <br />
* '''Difficulty'''<br />
: easy/medium<br />
* '''Mentor'''<br />
: [[User:KaKiLa|KaKiLa]]<br />
<br />
=== Symbolic package ===<br />
<br />
Octave's [https://github.com/cbm755/octsympy Symbolic package] handles symbolic computing and other CAS tools. The main component of Symbolic is a pure m-file class "@sym" which uses the Python package [https://www.sympy.org SymPy] to do (most of) the actual computations. The package aims to expose the full functionality of SymPy while also providing a high-level of compatibility with the Matlab Symbolic Math Toolbox. The Symbolic package requires communication between Octave and Python. Recently, a GSoC2016 project successfully re-implemented this communication using the new [https://bitbucket.org/mtmiller/pytave Pytave tool].<br />
<br />
This project proposes to go further: instead of using Pytave only for the communication layer, we'll use it throughout the Symbolic project. For example, we might make "@sym" a subclass of "@pyobject". We also could stop using the "python_cmd" interface and use Pytave directly from methods. The main goal was already mentioned: to expose the *full functionality* of SymPy. For example, we would allow OO-style method calls such as "f.diff(x)" instead of "diff(f, x)".<br />
<br />
* '''Required skills'''<br />
: OO-programming with m-files, Python, and possibly C/C++ for improving Pytave (if needed).<br />
* '''Difficulty'''<br />
: easy/medium<br />
* '''Mentors and/or other team members'''<br />
: Colin B. Macdonald, Mike Miller, Abhinav Tripathi<br />
<br />
=== Interval package ===<br />
<br />
The [[Interval_package|interval package]] provides several arithmetic functions with accurate and guaranteed error bounds. Its development started in the end of 2014 and there is some fundamental functionality left to be implemented. See the [https://octave.sourceforge.io/interval/overview.html list of functions], basically any missing numeric Octave function could be implemented as an interval extension in the package. Potential projects:<br />
* Implement missing algorithms (as m-files)-difficulty and whether knowledge in interval analysis is required depends on the particular function. Of course, you may use papers which present such algorithms.<br />
* Improve existing algorithms (support more options for plotting, support more options for optimizers, increase accuracy, …)<br />
* Integrate functions from VERSOFT [http://uivtx.cs.cas.cz/~rohn/matlab/] in the package (some work has already been done and current progress is tracked in [[Interval_package#VERSOFT]]). This basically involves conversion of the documentation into Texinfo format, use [[Contribution_guidelines#Coding_style|Octave coding guidelines]] and to make sure that any called functions are available in the interval package. VERSOFT is originally based on INTLAB [http://www.ti3.tu-harburg.de/rump/intlab/], a proprietary Octave/Matlab package. Some functions may be missing. Also, the interval package doesn't support complex numbers, so it might not be possible to migrate some functions.<br />
* List more interesting use cases of interval arithmetic in the package's manual [https://octave.sourceforge.io/interval/package_doc/Examples.html]<br />
<br />
* '''Required skills'''<br />
: m-file scripting, basic knowledge of computer arithmetics (especially floating-point computations), interval analysis (depending on the functions to implement).<br />
* '''Difficulty'''<br />
: Medium.<br />
* '''Mentor and co-mentor'''<br />
: [[User:oheim|Oliver Heimlich]], [[User:Siko1056|Kai T. Ohlhus]]<br />
<br />
=== OCS ===<br />
<br />
[[Ocs package | OCS]] is a circuit simulator for Octave. The objective of this project is to update the code to use modern features of Octave (e.g. classdef), fix open bugs, increase compatibility with SPICE and improve compatibility with other Octave packages (odepkg, control etc).<br />
<br />
* [http://octave.sourceforge.net/ocs/overview.html Package help at source forge.] <br />
<br />
* '''Required skills'''<br />
: m-file scripting, C, C++, and FORTRAN API knowledge. <br />
* '''Difficulty'''<br />
: easy/medium<br />
* '''Mentor'''<br />
: Sebastian Schöps, Carlo de Falco<br />
<br />
== Infrastructure ==<br />
<br />
=== Jupyter Integration ===<br />
<br />
[http://jupyter.org Jupyter Notebook] is a web-based worksheet interface for computing. There is a [https://github.com/Calysto/octave_kernel Octave kernel for Jupyter]. This project seeks to improve that kernel to make Octave a first-class experience within the Jupyter Notebook.<br />
<br />
* '''Mentors'''<br />
: Colin B. Macdonald, Mike Miller, others?<br />
<br />
<br />
=== Using Python within Octave ===<br />
<br />
[https://bitbucket.org/mtmiller/pytave Pytave] allows one to call Python functions and interact with Python objects from within Octave .m file code and from the Octave command line interface. Ideally, Pytave will not be a separate project, but rather a core feature of Octave. This project aims to improve Pytave with the goal of merging the code into the core Octave code base. <br />
<br />
Based on a previous summer project related to Pytave, this work will consist of fast-paced collaborative software development based on tackling the [https://bitbucket.org/mtmiller/pytave/issues?status=new&status=open pytave issue list]. You would also be expected to participate in software design decisions and discussion, as well as improve documentation, doctests and unit tests. As an example of the sorts of decision decisions being made, note that Octave indexes from 1 whereas Python typically indexes from 0; in which cases is it appropriate to make this transparent to the user?<br />
<br />
* '''Mentors'''<br />
: Mike Miller, Colin B. Macdonald, Abhinav Tripathi, others?<br />
<br />
<br />
=== Octave Package management ===<br />
<br />
Octave management of installed packages is performed by a single function, {{codeline|pkg}}, which does pretty much everything. This function has a few limitations which are hard to implement with the current codebase, and will most likely require a full rewrite.<br />
<br />
The planned improvements are:<br />
<br />
* install from URLs<br />
* install and update from repositories (hg and git)<br />
* automatic handling of dependencies<br />
* easily load, update or check specific package versions<br />
* management of tests and demos in C++ sources of packages<br />
* more flexibility on dependencies, e.g., dependent on specific Octave build options or being dependent in one of multiple packages<br />
* support for multiple version packages<br />
* support for multiple Octave installs<br />
* support for system-wide and user installed packages<br />
<br />
The main objective of this project is to make {{codeline|pkg}} more user friendly and to make it a tool to foster third party participation in Octave.<br />
{{codeline|pkg}} needs to be more flexible and intelligent when dealing with packages, different verisons and different sources, as well as options on how to build and install the package.<br />
There are also advance features of pkg that are useful for testing packages. However, the current {{codeline|pkg}} also performs some maintenance functions which it probably should not.<br />
Instead a package for developers should be created with such tools.<br />
<br />
To do this enhacenment effectively, a refactoring of the current {{codeline|pkg}} code will be needed.<br />
[https://bitbucket.org/carandraug/octave/commits/branch/pkg This job was started once], but due to diverging and growing specifications, it stalled. <br />
In this project we will focus on the most needed features, keeping the requirements to a minimum. <br />
<br />
Many of these problems have been solved in other languages. Familiarity with how other languages handle this problem will be useful to come up with elegant solutions. In some cases, there are standards to follow. For example, there are specifications published by freedesktop.org about where files should go ([http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html base directory spec]) and Windows seems to have its own standards. See bugs {{bug|36477}} and {{bug|40444}} for more details.<br />
<br />
In addition, package names may start to collide very easily. One horrible way to workaround this by is choosing increasingly complex package names that give no hint on the package purpose. A much better is option is providing an Authority category like Perl 6 does. Nested packages is also an easy way to provide packages for specialized subjects (think {{codeline|image::morphology}}). A new {{codeline|pkg}} would think all this things now, or allow their implementation at a later time. Read the [[OEP:pkg|unfinished plan]] for more details.<br />
<br />
* '''Minimum requirements'''<br />
: Ability to read and write Octave code, experience with Octave packages, and understanding of the basics of autotools. The most important skill is software design.<br />
* '''Difficulty'''<br />
: Easy to Medium.<br />
* '''Mentor'''<br />
: [[User:KaKiLa|KaKiLa]], Carnë Draug, Carlo de Falco, Sebastian Schöps<br />
<br />
=== SPQR Interface ===<br />
<br />
Octave implements QR factorization for sparse matrices, but it does so with an older library. This has caused fundamental issues, including segfaults as recorded here (https://savannah.gnu.org/bugs/?func=detailitem&item_id=51950). The goal of this project is to program an interface to the API for the SQPR library (http://faculty.cse.tamu.edu/davis/suitesparse.html). This is the same library that Matlab uses for this purpose.<br />
<br />
* '''Minimum requirements'''<br />
: Ability to read and write C++ code.<br />
* '''Difficulty'''<br />
: Medium.<br />
* '''Mentor'''<br />
: <br />
<br />
== Image Analysis ==<br />
<br />
=== Improvements to N-dimensional image processing ===<br />
<br />
The image package has partial functionality for N-dimensional images. These images exist for example in medical imaging where slices from scans are assembled to form anatomical 3D images. If taken over time and at different laser wavelengths or light filters, they can also result in 5D images. Albeit less common, images with even more dimensions also exist. However, their existence is irrelevant since most of the image processing operations are mathematical operations which are independent of the number of dimensions.<br />
<br />
As part of GSoC 2013, the core functions for image IO, {{codeline|imwrite}} and {{codeline|imread}}, were extended to better support this type of images. Likewise, many functions in the image package, mostly morphology operators, were expanded to deal with this type of image. Since then, many other functions have been improved, sometimes completely rewritten, to abstract from the number of dimensions. In a certain way, supporting ND images is also related to choosing good algorithms since such large images tend to be quite large.<br />
<br />
This project will continue on the previous work, and be mentored by the previous GSoC student and current image package maintainer. Planning the project requires selection of functions lacking ND support and identifying their dependencies. For example, supporting {{codeline|imclose}} and {{codeline|imopen}} was better implemented by supporting {{codeline|imerode}} and {{codeline|imdilate}} which then propagated ND support to all of its dependencies. These dependencies need to be discovered first since often they are not being used yet, and may even be missing function. This project can also be about implementing functions that have [[Image package#Missing functions | not yet been implemented]]. Also note that while some functions in the image package will accept ND images as input, they are actually not correctly implemented and will give incorrect results.<br />
<br />
* '''Required skills'''<br />
: m-file scripting, and a fair amount of C++ since a lot of image analysis cannot be vectorized. Familiarity with common CS algorithms and willingness to read literature describing new algorithms will be useful. <br />
* '''Difficulty'''<br />
: Difficult.<br />
* '''Potential mentor'''<br />
: Carnë Draug<br />
<br />
=== Improve Octave's image IO ===<br />
<br />
There are a lot of image formats. To handle this, Octave uses [http://www.graphicsmagick.org/ GraphicsMagic] (GM), a library capable of handling [http://www.graphicsmagick.org/formats.html a lot of them] in a single C++ interface. However, GraphicsMagick still has its limitations. The most important are:<br />
<br />
* GM has build option {{codeline|quantum}} which defines the bitdepth to use when reading an image. Building GM with high quantum means that images of smaller bitdepth will take a lot more memory when reading, but building it too low will make it impossible to read images of higher bitdepth. It also means that the image needs to always be rescaled to the correct range.<br />
* GM supports unsigned integers only thus incorrectly reading files such as TIFF with floating point data<br />
* GM hides away details of the image such as whether the image file is indexed. This makes it hard to access the real data stored on file.<br />
<br />
This project would implement better image IO for scientific file formats while leaving GM handle the others. Since TIFF is the de facto standard for scientific images, this should be done first. Among the targets for the project are:<br />
<br />
* implement the Tiff class which is a wrap around libtiff, using classdef. To avoid creating too many private __oct functions, this project could also create a C++ interface to declare new Octave classdef functions.<br />
* improve imread, imwrite, and imfinfo for tiff files using the newly created Tiff class<br />
* port the bioformats into Octave and prepare a package for it<br />
* investigate other image IO libraries<br />
* clean up and finish the dicom package to include into Octave core<br />
* prepare a matlab compatible implementation of the FITS package for inclusion in Octave core<br />
<br />
* '''Required skills'''<br />
: Knowledge of C++ and C since most libraries are written in those languages.<br />
* '''Difficulty'''<br />
: Medium.<br />
* '''Potential mentor'''<br />
: Carnë Draug<br />
<br />
== GUI ==<br />
<br />
=== GUI Variable Editor and Property Inspector ===<br />
<br />
Octave has a preliminary implementation of a Variable Editor: a spreadsheet-like tool for quickly editing and visualizing variables. The initial phase of the project will be learning how the implementation was done.<br />
<br />
With the knowledge gained, the second part of the project will be to implement a Property Inspector. This is a spreadsheet like interface to the many, many graphics properties that exist and are different on a per-object basis. The goal would be not only the concise-display of the existing properties, but a reasonable user interface to change them. As examples, boolean properties should be able to be toggled with a double-click; Radio properties should have a drop-down list of only the supported options; Other properties that can be modified should have the constraints built-in (for example, Linewidth must be a scalar, while Position must be a 1x4 vector). It would also be important to have easy access to the documentation of a property.<br />
<br />
For reference, Matlab has a similar Property Inspector (https://www.mathworks.com/help/matlab/ref/inspect.html).<br />
<br />
* '''Minimum requirements'''<br />
: Ability to read and write C++ code. Experience with Qt toolkit and GUI programming is optional, but desirable.<br />
* '''Difficulty'''<br />
: Medium.<br />
* '''Mentor'''<br />
:<br />
<br />
== Graphics ==<br />
<br />
=== PolarAxes and Plotting Improvements ===<br />
<br />
Octave currently provides supports for polar axes by using a Cartesian 2-D axes and adding a significant number of properties and callback listerners to get things to work. What is needed is a first class implementation of a "polaraxes" object in C++. This will require creating a new fundamental graphics object type, and programming in C++/OpenGL to render the object. When "polaraxes" exist as an object type then m-files will be written to access them including polaraxes.m, polarplot.m, rticks.m, rticklabels.m, thetaticks, thetaticklabels.m, rlim.m, thetalim.m. relates to {{bug|35565}}, {{bug|49804}}, {{bug|52643}}.<br />
<br />
* '''Minimum requirements'''<br />
: Ability to read and write C++ code. Ability to read and write Octave code. Experience with OpenGL programming is optional.<br />
* '''Difficulty'''<br />
: Medium.<br />
* '''Mentor'''<br />
: Rik <br />
<br />
<noinclude><br />
[[Category:Summer of Code]]<br />
[[Category:Project Ideas]]<br />
</noinclude></div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Optimization_package&diff=11285
Optimization package
2018-12-22T16:29:36Z
<p>Ricardofantin: Inserted all missing functions from Optimization Toolbox (https://www.mathworks.com/help/optim/referencelist.html?type=function&s_cid=doc_ftr)</p>
<hr />
<div>The {{Forge|optim|optimization package}} is part of the Octave Forge project.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the optimization package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/optim/ development sources] before adding it.}}<br />
<br />
=== Missing functions ===<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* bintprog*<br />
* color*<br />
* evaluate<br />
* fgoalattain<br />
* findindex<br />
* fminbnd<br />
* fmincon<br />
* fminimax<br />
* fminsearch<br />
* fminunc<br />
* fseminf<br />
* fsolve<br />
* fzero<br />
* fzmult*<br />
* gangstr*<br />
* infeasibility<br />
* intlinprog<br />
* ktrlink*<br />
* lsqnonneg<br />
* mpsread<br />
* optimconstr<br />
* optimexpr<br />
* OptimizationConstraint<br />
* OptimizationExpression<br />
* OptimizationProblem<br />
* OptimizationVariable<br />
* optimoptions<br />
* optimproblem<br />
* optimset<br />
* optimtool<br />
* optimvar<br />
* prob2struct<br />
* resetoptions<br />
* showbounds<br />
* showconstr<br />
* showexpr<br />
* showproblem<br />
* showvar<br />
* solve<br />
* writebounds<br />
* writeconstr<br />
* writeexpr<br />
* writeproblem<br />
* writevar<br />
</div><br />
<br />
deprecated functions have an extra *<br />
<br />
=== Missing options ===<br />
<br />
[[Category:Octave Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=11259
Image package
2018-11-23T17:57:00Z
<p>Ricardofantin: colorangle, bwunpack, bwpack, axes2pix merged. Patch for multithresh post name updated.</p>
<hr />
<div>The {{Forge|image|image package}} is part of the Octave Forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
<div class="tocinline">__TOC__</div><br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwtraceboundary<br />
* bwulterode<br />
* chromadapt<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* [https://savannah.gnu.org/patch/?9717 imapplymatrix]<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* [https://savannah.gnu.org/patch/?9606 integralImage]<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || In Progress<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52959}} || [octave forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53654}} || [octave forge] (image) "rgb2gray.m shadows a core function" only under Windows, not under Linux || Works For Me<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: [octave forge] (image) multithresh<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9606}}: [Octave forge] (image) New function integralImage<br />
* {{patch|9717}}: [octave forge] (image) new function imapplymatrix<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || function is in Octave core || {{bug|53654}} || || Octave version 4.4.0 and above<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| colorangle || 2.10.0 (unreleased) || || || <br />
|-<br />
| lab2double || 2.6.0 || || || <br />
|-<br />
| lab2rgb || 2.6.0 || || || <br />
|-<br />
| lab2uint16 || 2.6.0 || || || <br />
|-<br />
| lab2uint8 || 2.6.0 || || || <br />
|-<br />
| lab2xyz || 2.6.0 || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || 2.8.0 || || || <br />
|-<br />
| rgb2lab || 2.6.0 || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || 2.8.0 || || || <br />
|-<br />
| rgb2xyz || 2.6.0 || || || <br />
|-<br />
| rgb2ycbcr || < 1.0.0|| || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || 2.6.0 || || || <br />
|-<br />
| xyz2rgb || 2.6.0 || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || 2.2.0|| || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || 2.2.0 || || ||<br />
|-<br />
| imnoise || 2.2.2 || || ||<br />
|-<br />
| phantom || 2.6.2 || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || {{patch|9606}} || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || 2.8.0|| || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || 2.8.0 || || ||<br />
|- <br />
| imextendedmin || 2.8.0 || || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || 2.8.0 || || ||<br />
|- <br />
| imhmin || 2.8.0 || || ||<br />
|- <br />
| imimposemin || 2.8.0 || || ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Graphical Interface Interaction === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| imellipse || - || || ||<br />
|- <br />
| imfreehand || - || || ||<br />
|-<br />
| imline || - || || ||<br />
|-<br />
| immagbox || - || || ||<br />
|-<br />
| imoverview || - || || ||<br />
|-<br />
| imoverviewpanel || - || || ||<br />
|-<br />
| impixelinfo || - || {{patch|8722}} || ||<br />
|-<br />
| impixelinfoval || - || {{patch|8722}} || ||<br />
|-<br />
| impixelregion || - || || ||<br />
|-<br />
| impixelregionpanel || - || || ||<br />
|-<br />
| implay || - || || ||<br />
|-<br />
| impoint || - || || ||<br />
|-<br />
| impoly || - || || ||<br />
|-<br />
| imrect || - || || ||<br />
|-<br />
| imscrollpanel || - || || ||<br />
|-<br />
| iptgetpref || - || || ||<br />
|-<br />
| iptprefs || - || || ||<br />
|-<br />
| iptsetpref || - || || ||<br />
|-<br />
|}<br />
* Obs: implay, iptgetpref, iptprefs, iptsetpref functions are on Basic Display section too...<br />
<br />
[[Category:Octave Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=11253
Image package
2018-11-11T17:52:18Z
<p>Ricardofantin: Included a link to the new patch to imapplymatrix</p>
<hr />
<div>The {{Forge|image|image package}} is part of the Octave Forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
<div class="tocinline">__TOC__</div><br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* [https://savannah.gnu.org/patch/index.php?9608 colorangle]<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* [https://savannah.gnu.org/patch/?9717 imapplymatrix]<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* [https://savannah.gnu.org/patch/?9606 integralImage]<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || In Progress<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52959}} || [octave forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53654}} || [octave forge] (image) "rgb2gray.m shadows a core function" only under Windows, not under Linux || Works For Me<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9606}}: [Octave forge] (image) New function integralImage<br />
* {{patch|9608}}: [Octave forge] (image) new function colorangle<br />
* {{patch|9717}}: [octave forge] (image) new function imapplymatrix<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || function is in Octave core || {{bug|53654}} || || Octave version 4.4.0 and above<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| colorangle || - || {{patch|9608}} || || <br />
|-<br />
| lab2double || 2.6.0 || || || <br />
|-<br />
| lab2rgb || 2.6.0 || || || <br />
|-<br />
| lab2uint16 || 2.6.0 || || || <br />
|-<br />
| lab2uint8 || 2.6.0 || || || <br />
|-<br />
| lab2xyz || 2.6.0 || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || 2.8.0 || || || <br />
|-<br />
| rgb2lab || 2.6.0 || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || 2.8.0 || || || <br />
|-<br />
| rgb2xyz || 2.6.0 || || || <br />
|-<br />
| rgb2ycbcr || < 1.0.0|| || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || 2.6.0 || || || <br />
|-<br />
| xyz2rgb || 2.6.0 || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || 2.2.0|| || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || 2.2.0 || || ||<br />
|-<br />
| imnoise || 2.2.2 || || ||<br />
|-<br />
| phantom || 2.6.2 || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || {{patch|9606}} || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || 2.8.0|| || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || 2.8.0 || || ||<br />
|- <br />
| imextendedmin || 2.8.0 || || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || 2.8.0 || || ||<br />
|- <br />
| imhmin || 2.8.0 || || ||<br />
|- <br />
| imimposemin || 2.8.0 || || ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Graphical Interface Interaction === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| imellipse || - || || ||<br />
|- <br />
| imfreehand || - || || ||<br />
|-<br />
| imline || - || || ||<br />
|-<br />
| immagbox || - || || ||<br />
|-<br />
| imoverview || - || || ||<br />
|-<br />
| imoverviewpanel || - || || ||<br />
|-<br />
| impixelinfo || - || {{patch|8722}} || ||<br />
|-<br />
| impixelinfoval || - || {{patch|8722}} || ||<br />
|-<br />
| impixelregion || - || || ||<br />
|-<br />
| impixelregionpanel || - || || ||<br />
|-<br />
| implay || - || || ||<br />
|-<br />
| impoint || - || || ||<br />
|-<br />
| impoly || - || || ||<br />
|-<br />
| imrect || - || || ||<br />
|-<br />
| imscrollpanel || - || || ||<br />
|-<br />
| iptgetpref || - || || ||<br />
|-<br />
| iptprefs || - || || ||<br />
|-<br />
| iptsetpref || - || || ||<br />
|-<br />
|}<br />
* Obs: implay, iptgetpref, iptprefs, iptsetpref functions are on Basic Display section too...<br />
<br />
[[Category:Octave Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10979
Image package
2018-03-29T18:33:33Z
<p>Ricardofantin: /* Color */</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* [https://savannah.gnu.org/patch/index.php?9608 colorangle]<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9606}}: [Octave-forge] (image) New function integralImage<br />
* {{patch|9608}}: image package: new function colorangle<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| colorangle || - || {{patch|9608}} || || <br />
|-<br />
| lab2double || 2.6.0 || || || <br />
|-<br />
| lab2rgb || 2.6.0 || || || <br />
|-<br />
| lab2uint16 || 2.6.0 || || || <br />
|-<br />
| lab2uint8 || 2.6.0 || || || <br />
|-<br />
| lab2xyz || 2.6.0 || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || 2.6.0 || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || 2.6.0 || || || <br />
|-<br />
| rgb2ycbcr || dev || || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || 2.6.0 || || || <br />
|-<br />
| xyz2rgb || 2.6.0 || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || dev || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || dev || || ||<br />
|-<br />
| imnoise || 2.2.2 || || ||<br />
|-<br />
| phantom || 2.6.2 || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Graphical Interface Interaction === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| imellipse || - || || ||<br />
|- <br />
| imfreehand || - || || ||<br />
|-<br />
| imline || - || || ||<br />
|-<br />
| immagbox || - || || ||<br />
|-<br />
| imoverview || - || || ||<br />
|-<br />
| imoverviewpanel || - || || ||<br />
|-<br />
| impixelinfo || - || {{patch|8722}} || ||<br />
|-<br />
| impixelinfoval || - || {{patch|8722}} || ||<br />
|-<br />
| impixelregion || - || || ||<br />
|-<br />
| impixelregionpanel || - || || ||<br />
|-<br />
| implay || - || || ||<br />
|-<br />
| impoint || - || || ||<br />
|-<br />
| impoly || - || || ||<br />
|-<br />
| imrect || - || || ||<br />
|-<br />
| imscrollpanel || - || || ||<br />
|-<br />
| iptgetpref || - || || ||<br />
|-<br />
| iptprefs || - || || ||<br />
|-<br />
| iptsetpref || - || || ||<br />
|-<br />
|}<br />
* Obs: implay, iptgetpref, iptprefs, iptsetpref functions are on Basic Display section too...<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10978
Image package
2018-03-29T18:26:48Z
<p>Ricardofantin: /* Synthetic Images */</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* [https://savannah.gnu.org/patch/index.php?9608 colorangle]<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9606}}: [Octave-forge] (image) New function integralImage<br />
* {{patch|9608}}: image package: new function colorangle<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| colorangle || - || {{patch|9608}} || || <br />
|-<br />
| lab2double || - || || || <br />
|-<br />
| lab2rgb || - || || || <br />
|-<br />
| lab2uint16 || - || || || <br />
|-<br />
| lab2uint8 || - || || || <br />
|-<br />
| lab2xyz || - || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || - || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || - || || || <br />
|-<br />
| rgb2ycbcr || - || || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || - || || || <br />
|-<br />
| xyz2rgb || - || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || - || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || dev || || ||<br />
|-<br />
| imnoise || 2.2.2 || || ||<br />
|-<br />
| phantom || 2.6.2 || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Graphical Interface Interaction === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| imellipse || - || || ||<br />
|- <br />
| imfreehand || - || || ||<br />
|-<br />
| imline || - || || ||<br />
|-<br />
| immagbox || - || || ||<br />
|-<br />
| imoverview || - || || ||<br />
|-<br />
| imoverviewpanel || - || || ||<br />
|-<br />
| impixelinfo || - || {{patch|8722}} || ||<br />
|-<br />
| impixelinfoval || - || {{patch|8722}} || ||<br />
|-<br />
| impixelregion || - || || ||<br />
|-<br />
| impixelregionpanel || - || || ||<br />
|-<br />
| implay || - || || ||<br />
|-<br />
| impoint || - || || ||<br />
|-<br />
| impoly || - || || ||<br />
|-<br />
| imrect || - || || ||<br />
|-<br />
| imscrollpanel || - || || ||<br />
|-<br />
| iptgetpref || - || || ||<br />
|-<br />
| iptprefs || - || || ||<br />
|-<br />
| iptsetpref || - || || ||<br />
|-<br />
|}<br />
* Obs: implay, iptgetpref, iptprefs, iptsetpref functions are on Basic Display section too...<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10973
Image package
2018-03-28T19:20:32Z
<p>Ricardofantin: /* Type Conversion */</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* [https://savannah.gnu.org/patch/index.php?9608 colorangle]<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9606}}: [Octave-forge] (image) New function integralImage<br />
* {{patch|9608}}: image package: new function colorangle<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| colorangle || - || {{patch|9608}} || || <br />
|-<br />
| lab2double || - || || || <br />
|-<br />
| lab2rgb || - || || || <br />
|-<br />
| lab2uint16 || - || || || <br />
|-<br />
| lab2uint8 || - || || || <br />
|-<br />
| lab2xyz || - || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || - || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || - || || || <br />
|-<br />
| rgb2ycbcr || - || || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || - || || || <br />
|-<br />
| xyz2rgb || - || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || - || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || - || || ||<br />
|-<br />
| imnoise || - || || ||<br />
|-<br />
| phantom || - || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Graphical Interface Interaction === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| imellipse || - || || ||<br />
|- <br />
| imfreehand || - || || ||<br />
|-<br />
| imline || - || || ||<br />
|-<br />
| immagbox || - || || ||<br />
|-<br />
| imoverview || - || || ||<br />
|-<br />
| imoverviewpanel || - || || ||<br />
|-<br />
| impixelinfo || - || {{patch|8722}} || ||<br />
|-<br />
| impixelinfoval || - || {{patch|8722}} || ||<br />
|-<br />
| impixelregion || - || || ||<br />
|-<br />
| impixelregionpanel || - || || ||<br />
|-<br />
| implay || - || || ||<br />
|-<br />
| impoint || - || || ||<br />
|-<br />
| impoly || - || || ||<br />
|-<br />
| imrect || - || || ||<br />
|-<br />
| imscrollpanel || - || || ||<br />
|-<br />
| iptgetpref || - || || ||<br />
|-<br />
| iptprefs || - || || ||<br />
|-<br />
| iptsetpref || - || || ||<br />
|-<br />
|}<br />
* Obs: implay, iptgetpref, iptprefs, iptsetpref functions are on Basic Display section too...<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10972
Image package
2018-03-28T19:17:35Z
<p>Ricardofantin: Create a category for GUI interaction based functions</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* [https://savannah.gnu.org/patch/index.php?9608 colorangle]<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9606}}: [Octave-forge] (image) New function integralImage<br />
* {{patch|9608}}: image package: new function colorangle<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''demosaic''<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| colorangle || - || {{patch|9608}} || || <br />
|-<br />
| lab2double || - || || || <br />
|-<br />
| lab2rgb || - || || || <br />
|-<br />
| lab2uint16 || - || || || <br />
|-<br />
| lab2uint8 || - || || || <br />
|-<br />
| lab2xyz || - || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || - || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || - || || || <br />
|-<br />
| rgb2ycbcr || - || || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || - || || || <br />
|-<br />
| xyz2rgb || - || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || - || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || - || || ||<br />
|-<br />
| imnoise || - || || ||<br />
|-<br />
| phantom || - || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Graphical Interface Interaction === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| imellipse || - || || ||<br />
|- <br />
| imfreehand || - || || ||<br />
|-<br />
| imline || - || || ||<br />
|-<br />
| immagbox || - || || ||<br />
|-<br />
| imoverview || - || || ||<br />
|-<br />
| imoverviewpanel || - || || ||<br />
|-<br />
| impixelinfo || - || {{patch|8722}} || ||<br />
|-<br />
| impixelinfoval || - || {{patch|8722}} || ||<br />
|-<br />
| impixelregion || - || || ||<br />
|-<br />
| impixelregionpanel || - || || ||<br />
|-<br />
| implay || - || || ||<br />
|-<br />
| impoint || - || || ||<br />
|-<br />
| impoly || - || || ||<br />
|-<br />
| imrect || - || || ||<br />
|-<br />
| imscrollpanel || - || || ||<br />
|-<br />
| iptgetpref || - || || ||<br />
|-<br />
| iptprefs || - || || ||<br />
|-<br />
| iptsetpref || - || || ||<br />
|-<br />
|}<br />
* Obs: implay, iptgetpref, iptprefs, iptsetpref functions are on Basic Display section too...<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10966
Image package
2018-03-27T15:41:34Z
<p>Ricardofantin: /* Color */</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* [https://savannah.gnu.org/patch/index.php?9608 colorangle]<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9606}}: [Octave-forge] (image) New function integralImage<br />
* {{patch|9608}}: image package: new function colorangle<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''demosaic''<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| colorangle || - || {{patch|9608}} || || <br />
|-<br />
| lab2double || - || || || <br />
|-<br />
| lab2rgb || - || || || <br />
|-<br />
| lab2uint16 || - || || || <br />
|-<br />
| lab2uint8 || - || || || <br />
|-<br />
| lab2xyz || - || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || - || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || - || || || <br />
|-<br />
| rgb2ycbcr || - || || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || - || || || <br />
|-<br />
| xyz2rgb || - || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || - || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || - || || ||<br />
|-<br />
| imnoise || - || || ||<br />
|-<br />
| phantom || - || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10965
Image package
2018-03-27T15:41:10Z
<p>Ricardofantin: /* Color */</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* [https://savannah.gnu.org/patch/index.php?9608 colorangle]<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9606}}: [Octave-forge] (image) New function integralImage<br />
* {{patch|9608}}: image package: new function colorangle<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''demosaic''<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|-<br />
| colorangle || - || {{patch|9608}} || || <br />
|-<br />
| lab2double || - || || || <br />
|-<br />
| lab2rgb || - || || || <br />
|-<br />
| lab2uint16 || - || || || <br />
|-<br />
| lab2uint8 || - || || || <br />
|-<br />
| lab2xyz || - || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || - || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || - || || || <br />
|-<br />
| rgb2ycbcr || - || || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || - || || || <br />
|-<br />
| xyz2rgb || - || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || - || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorangle, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || - || || ||<br />
|-<br />
| imnoise || - || || ||<br />
|-<br />
| phantom || - || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Short_projects&diff=10955
Short projects
2018-03-27T00:34:29Z
<p>Ricardofantin: Included some functions very easy to implement ("gift bug")</p>
<hr />
<div>This is a list of small projects, the type that could be done in a couple of hours, maybe even minutes (no promises, we should all know about how estimates for software development work). This is probably the best place for users who want to start helping with Octave development (please, see also Octave coding guidelines). Please submit a fix to the [https://savannah.gnu.org/bugs/?func=additem&group=octave bug tracker] (not to the mailing list) and add a link to the item in question. Use the [https://savannah.gnu.org/patch/?func=additem&group=octave patch tracker] for submissions unrelated to an existing bug.<br />
<br />
The list is meant to be dynamic -- please add, remove, and comment on it. And since the things are likely to be of short duration, don't ask if is there is anyone already working on it. Projects of long duration should be added to the [[Projects]] page instead.<br />
<br />
Most of the small and easy bugs are caught and fixed quickly by the Octave developers. The best way to catch an easy one is then to [https://lists.gnu.org/mailman/listinfo/octave-bug-tracker subscribe to the bug tracker] (note that this has a lot of activity so you'll probably prefer to receive a digest).<br />
<br />
{{warning| do not simply add a patch/file to the bug or patch tracker. Always leave a comment at the same time, even if it just a simple "I prepared a change that should fix it". If there is no comment, it's hard to notice that a patch was added since there will be no notice on the discussion about it.}}<br />
<br />
== Bugs==<br />
<br />
Please help with the triage of [https://savannah.gnu.org/bugs/?group=octave existing bugs] to populate the list of easy bugs below. You may find it useful to review the [http://wiki.octave.org/wiki/index.php?title=Short_projects&action=history history] of this short projects page, to give you an idea of past successful short projects. <br />
* {{bug|41674}} - image package: temporary arrays in imresize are doubles<br />
* {{patch|8368}} - imremap - Change to imremap to reduce memory footprint<br />
* {{patch|8369}} - imresize - Change to imresize to reduce memory footprint<br />
<br />
==== Code submitted, requires changeset & verification ====<br />
Sometimes a standalone file or a diff file is submitted; Octave maintainers prefer a changeset though; preparing a changeset will expedite bug fixing.<br />
<br />
* {{bug|48151}} - pkg update - error if packages are specified<br />
<br />
== Missing functions ==<br />
<br />
* there is a list of missing functions for the [[image package|image]], [[mapping package|mapping]], [[Optimization package|optimization]], and [[Signal package|signal]] packages.<br />
** It would help to group the several missing functions in the [[image package]], as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
* openfig/savefig functions<br />
** These should be particularly easy additions as they are really just a wrapper on top of hgload/hgsave.<br />
<br />
=== Missing functions that are very easy to implement ===<br />
Some projects have "gift bugs". They are easy to implement bugs intended to a newcomer to solve and get familiar with the code and the project. Here is the list:<br />
* angl2str<br />
* deg2rad<br />
* dist2d<br />
* dist2str<br />
* rad2deg<br />
* vecnorm<br />
<br />
== Function Compatibility ==<br />
A number of functions are implemented, but may have known incompatibilities or only partially handled option sets, etc.<br />
* integral - currently cannot handle all optional inputs, see see {{bug|42037}}<br />
<br />
== BIST tests ==<br />
<br />
Write Built-In Self Tests (BIST) for a function. This improve's Octave's regression testing and ensures that we don't break anything when we add new features. Tests are written in the Octave m-file language and usually take less than 10 minutes to code for a single instance.<br />
<br />
* [[Add_BIST_tests_for_octave_functions_written_in_C%2B%2B| BIST for C++ functions]]<br />
<br />
* [[BIST_for_m-files| BIST for m-files]]. See also [[Projects#Tests]].<br />
<br />
== Miscellaneous ==<br />
<br />
* C++ cleanup of packages after the switch to exceptions (late 2015).See [[Invert if/else/error]].<br />
<br />
* Use "units.h" from [http://www.gnu.org/software/units/ GNU units] in [http://octave.sourceforge.net/miscellaneous/function/units.html function units] (from the Octave-Forge [http://octave.sourceforge.net/miscellaneous/ miscellaneous package]) rather than making a system call and parsing its output (and having to handle multiple versions of it). This change will make it much more robust. It likely will alleviate the requirement of having [http://www.gnu.org/software/units/ GNU units] installed in the system separately by the user. This requires knowledge of C (units is written on C) and C++ to write its Octave interface. It can be very easy if the units.h truly allows to be used as library or maybe impossible if it does not. This has not been investigated yet.<br />
<br />
* Use non-empty identifiers in all warnings and errors issued by Octave; see {{bug|39439}}, {{bug|39434}}. You may tackle as many or as few IDs as you have time for. As it is a widespread issue, finding occurrences in the source code should give you valuable knowledge about the way Octave files are organized. <br />
** When raising errors and warnings try to use the ids that are documented in the functions [http://octave.sourceforge.net/octave/function/warning_ids.html warning_ids] and [http://octave.sourceforge.net/octave/function/error_ids.html error_ids]. If you really need a new id (please, first read the ones already there!), please add it to those functions as well. If you see other ids used in core that are not given by the functions mentioned above, please, report or submit patch for them, in addition to the patch to the calling functions as well. <br />
<br />
* extend sub2ind and ind2sub: {{bug|41796}}<br />
<br />
[[Category:Development]]<br />
[[Category:Project Ideas]]<br />
<br />
== Feature requests ==<br />
* {{bug|41844}} - GUI Debug Menu could offer "Stop If..."<br />
* {{bug|41530}} - Editor debug mode could show a dbup/dbdown GUI component<br />
* {{bug|41470}} - offer editor preference "highlight current word"<br />
* {{bug|40211}} - More compact output for structs and cell arrays<br />
* {{bug|32088}} - Feature request: -ALL option for WHICH<br />
* {{bug|47464}} - audioformats: a new function to get information on supported audio formats<br />
* {{bug|47239}} - calling system without shell</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10954
Image package
2018-03-27T00:03:28Z
<p>Ricardofantin: /* Missing functions */</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* [https://savannah.gnu.org/patch/index.php?9608 colorangle]<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9606}}: [Octave-forge] (image) New function integralImage<br />
* {{patch|9608}}: image package: new function colorangle<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''demosaic''<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| lab2double || - || || || <br />
|-<br />
| lab2rgb || - || || || <br />
|-<br />
| lab2uint16 || - || || || <br />
|-<br />
| lab2uint8 || - || || || <br />
|-<br />
| lab2xyz || - || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || - || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || - || || || <br />
|-<br />
| rgb2ycbcr || - || || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || - || || || <br />
|-<br />
| xyz2rgb || - || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || - || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorangle, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || - || || ||<br />
|-<br />
| imnoise || - || || ||<br />
|-<br />
| phantom || - || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10953
Image package
2018-03-27T00:02:19Z
<p>Ricardofantin: /* Patches */</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* colorangle<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
* {{patch|9606}}: [Octave-forge] (image) New function integralImage<br />
* {{patch|9608}}: image package: new function colorangle<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''demosaic''<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| lab2double || - || || || <br />
|-<br />
| lab2rgb || - || || || <br />
|-<br />
| lab2uint16 || - || || || <br />
|-<br />
| lab2uint8 || - || || || <br />
|-<br />
| lab2xyz || - || || || <br />
|-<br />
| lin2rgb || - || {{patch|9600}} || ||<br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || - || || || <br />
|-<br />
| rgb2lin || - || {{patch|9600}} || ||<br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || - || || || <br />
|-<br />
| rgb2ycbcr || - || || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || - || || || <br />
|-<br />
| xyz2rgb || - || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || - || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorangle, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, makecform''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || - || || ||<br />
|-<br />
| imnoise || - || || ||<br />
|-<br />
| phantom || - || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10842
Image package
2018-03-20T11:41:40Z
<p>Ricardofantin: new patch submitted included</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* colorangle<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
* {{patch|9603}}: [Octave Forge] (Image) New functions: xyz2double.m, xyz2single.m, xyz2uint16.m<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''demosaic''<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| lab2double || - || || || <br />
|-<br />
| lab2rgb || - || || || <br />
|-<br />
| lab2uint16 || - || || || <br />
|-<br />
| lab2uint8 || - || || || <br />
|-<br />
| lab2xyz || - || || || <br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || - || || || <br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || - || || || <br />
|-<br />
| rgb2ycbcr || - || || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || - || || || <br />
|-<br />
| xyz2rgb || - || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || - || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorangle, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, lin2rgb, makecform, rgb2lin''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || - || || ||<br />
|-<br />
| imnoise || - || || ||<br />
|-<br />
| phantom || - || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10835
Image package
2018-03-19T20:41:02Z
<p>Ricardofantin: Included information about some new patches for functions</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* colorangle<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''demosaic''<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| lab2double || - || || || <br />
|-<br />
| lab2rgb || - || || || <br />
|-<br />
| lab2uint16 || - || || || <br />
|-<br />
| lab2uint8 || - || || || <br />
|-<br />
| lab2xyz || - || || || <br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || - || || || <br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || - || || || <br />
|-<br />
| rgb2ycbcr || - || || || <br />
|-<br />
| whitepoint || - || {{patch|8060}} || ||<br />
|-<br />
| xyz2double || - || {{patch|9603}} || ||<br />
|-<br />
| xyz2lab || - || || || <br />
|-<br />
| xyz2rgb || - || || || <br />
|-<br />
| xyz2uint16 || - || {{patch|9603}} || ||<br />
|-<br />
| ycbcr2rgb || - || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorangle, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, lin2rgb, makecform, rgb2lin''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || - || || ||<br />
|-<br />
| imnoise || - || || ||<br />
|-<br />
| phantom || - || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10831
Image package
2018-03-19T20:37:25Z
<p>Ricardofantin: Just inserted the link to some patches</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* colorangle<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} {{patch|9593}}|| [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || {{patch|9602}} || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''demosaic''<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| lab2double || - || || || <br />
|-<br />
| lab2rgb || - || || || <br />
|-<br />
| lab2uint16 || - || || || <br />
|-<br />
| lab2uint8 || - || || || <br />
|-<br />
| lab2xyz || - || || || <br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || - || || || <br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || - || || || <br />
|-<br />
| rgb2ycbcr || - || || || <br />
|-<br />
| xyz2lab || - || || || <br />
|-<br />
| xyz2rgb || - || || || <br />
|-<br />
| ycbcr2rgb || - || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorangle, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, lin2rgb, makecform, rgb2lin, whitepoint, xyz2double, xyz2uint16''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || - || || ||<br />
|-<br />
| imnoise || - || || ||<br />
|-<br />
| phantom || - || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10818
Image package
2018-03-19T18:23:05Z
<p>Ricardofantin: Included some new commited patches</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* colorangle<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
* {{patch|9593}}: [Octave Forge] (Image) New function demosaic.m from bug #50708<br />
* {{patch|9600}}: [Octave Forge] (Image) New functions: lin2rgb.m and lrgb2lin.m<br />
* {{patch|9602}}: multithresh () for the image package<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} || [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''demosaic''<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| lab2double || - || || || <br />
|-<br />
| lab2rgb || - || || || <br />
|-<br />
| lab2uint16 || - || || || <br />
|-<br />
| lab2uint8 || - || || || <br />
|-<br />
| lab2xyz || - || || || <br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || - || || || <br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || - || || || <br />
|-<br />
| rgb2ycbcr || - || || || <br />
|-<br />
| xyz2lab || - || || || <br />
|-<br />
| xyz2rgb || - || || || <br />
|-<br />
| ycbcr2rgb || - || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorangle, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, lin2rgb, makecform, rgb2lin, whitepoint, xyz2double, xyz2uint16''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || - || || ||<br />
|-<br />
| imnoise || - || || ||<br />
|-<br />
| phantom || - || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=Image_package&diff=10814
Image package
2018-03-19T17:54:37Z
<p>Ricardofantin: Included link to patch's which implement the functions</p>
<hr />
<div>The {{Forge|image|image package}} is part of the octave-forge project. See its {{Forge|image|homepage}} for the latest release.<br />
<br />
== Development ==<br />
<br />
Follows an incomplete list of stuff missing in the image package to be matlab compatible. Bugs are not listed here, [https://savannah.gnu.org/bugs/?func=search&group=octave search] and [https://savannah.gnu.org/bugs/?func=additem&group=octave report] them on the bug tracker instead.<br />
<br />
=== Roadmap ===<br />
<br />
The following are missing targets for the next minor release of the image package (version 2.8.0). Small bug fixes, build fixes, and regressions may still be released before in a patch release (Version 2.6.X).<br />
<br />
* add ellipse properties to {{codeline|regionprops}} (see bug {{bug|44100}}) ([http://hg.code.sf.net/p/octave/image/rev/7cf22a478792 done])<br />
* speed up {{codeline|regionprops}} for large images with many small objects (probably work around for loop with labeled == labelid)<br />
* support passing {{codeline|bwconncomp}} output to {{codeline|regionprops}} (and then fix {{codeline|bwpropfilt}} to use that instead of a labeled image)<br />
* ND support on {{codeline|imfilter}}<br />
* check if {{codeline|normxcorr2}} is Matlab compatible and investigate making use of {{codeline|fftconvn}} since it's likely to receive large input<br />
* investigate implementing the missing deconvolution functions (see patch {{patch|8571}})<br />
* anything else that is done or submitted before the above are done<br />
<br />
=== Missing functions ===<br />
{{Note|this entire section is about the current development version. If a Matlab function is missing from the list and does not appear on the current release of the package, confirm that is also missing in the [https://sourceforge.net/p/octave/image/ development sources] before adding it.}}<br />
<br />
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"><br />
* activecontour<br />
* adapthisteq<br />
* [https://savannah.gnu.org/patch/?8824 affine2d]<br />
* affine3d<br />
* applycform<br />
* axes2pix<br />
* bwconvhull<br />
* bwdistgeodesic<br />
* bwlookup<br />
* bwpack<br />
* bwtraceboundary<br />
* bwulterode<br />
* bwunpack<br />
* chromadapt<br />
* colorangle<br />
* colorcloud<br />
* convmtx2<br />
* corner<br />
* cornermetric<br />
* cpcorr<br />
* cpselect<br />
* cpstruct2pairs<br />
* dct2<br />
* dctmtx<br />
* deconvblind<br />
* deconvlucy<br />
* deconvreg<br />
* [https://savannah.gnu.org/patch/?9365 deconvwnr]<br />
* decorrstretch<br />
* [https://savannah.gnu.org/patch/?9593 demosaic]<br />
* dicomanon<br />
* dicomdisp<br />
* dicomuid<br />
* dpxinfo<br />
* dpxread<br />
* fan2para<br />
* fanbeam<br />
* fliptform<br />
* freqz2<br />
* fsamp2<br />
* ftrans2<br />
* fwind1<br />
* fwind2<br />
* gabor<br />
* getimage<br />
* getimagemodel<br />
* getline<br />
* getpts<br />
* getrect<br />
* gradientweight<br />
* grayconnected<br />
* graycoprops<br />
* graydiffweight<br />
* hdrread<br />
* hdrwrite<br />
* [https://savannah.gnu.org/patch/?9412 houghlines] -- (see hough_line)<br />
* [https://savannah.gnu.org/patch/?9407 houghpeaks]<br />
* iccfind<br />
* iccread<br />
* iccroot<br />
* iccwrite<br />
* idct2<br />
* ifanbeam<br />
* illumgray<br />
* illumpca<br />
* illumwhite<br />
* im2java2d<br />
* ImageAdapter<br />
* imageinfo<br />
* imapplymatrix<br />
* imapprox<br />
* imbinarize<br />
* imboxfilt<br />
* imboxfilt3<br />
* imcolormaptool<br />
* imcontour<br />
* imcontrast<br />
* imdisplayrange<br />
* imdistline<br />
* imellipse<br />
* imfreehand<br />
* imfuse<br />
* imgaborfilt<br />
* imgaussfilt<br />
* imgaussfilt3<br />
* imgca<br />
* imgcf<br />
* imguidedfilter<br />
* imhandles<br />
* imhistmatch<br />
* imline<br />
* immagbox<br />
* immovie<br />
* imoverview<br />
* imoverviewpanel<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfo]<br />
* [https://savannah.gnu.org/patch/?8722 impixelinfoval]<br />
* impixelregion<br />
* impixelregionpanel<br />
* implay<br />
* impoint<br />
* impoly<br />
* improfile<br />
* imrect<br />
* imref2d<br />
* imref3d<br />
* imregconfig<br />
* imregcorr<br />
* imregdemons<br />
* imregister<br />
* imregtform<br />
* imroi<br />
* imscrollpanel<br />
* imsegfmm<br />
* imseggeodesic<br />
* imshowpair<br />
* imtool<br />
* imwarp<br />
* integralBoxFilter<br />
* integralBoxFilter3<br />
* integralImage<br />
* integralImage3<br />
* interfileinfo<br />
* interfileread<br />
* iptaddcallback<br />
* iptcheckhandle<br />
* iptgetapi<br />
* iptGetPointerBehavior<br />
* iptgetpref<br />
* ipticondir<br />
* iptPointerManager<br />
* iptprefs<br />
* iptremovecallback<br />
* iptSetPointerBehavior<br />
* iptsetpref<br />
* iptwindowalign<br />
* isicc<br />
* isrset<br />
* [https://savannah.gnu.org/patch/?9600 lin2rgb]<br />
* makecform<br />
* makeConstrainToRectFcn<br />
* makehdr<br />
* makeresampler<br />
* [https://savannah.gnu.org/patch/?9602 multithresh]<br />
* nitfinfo<br />
* nitfread<br />
* openrset<br />
* [https://savannah.gnu.org/patch/?9360 otsuthresh]<br />
* para2fan<br />
* projective2d<br />
* regionfill<br />
* rgb2lin<br />
* roifill<br />
* roifilt2<br />
* [https://savannah.gnu.org/patch/?9509 roipoly]<br />
* rsetwrite<br />
* ssim<br />
* tformarray<br />
* tonemap<br />
* truesize<br />
* visboundaries<br />
* warp<br />
* [https://savannah.gnu.org/patch/?8060 whitepoint]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2double]<br />
* [https://savannah.gnu.org/patch/?9603 xyz2uint16]<br />
</div><br />
<br />
=== Different functions ===<br />
<br />
* with version 2014a, Matlab introduced a new function imtranslate. This function was part of Octave's package since 2002 but Matlab version is completely different. It needs to be rewritten for Matlab compatibility.<br />
<br />
=== Missing options ===<br />
<br />
* @strel<br />
** missing SE decomposition for the diamond shape<br />
** approximation argument for the ball and disk shapes are not implemented<br />
** the translate method is not yet implemented<br />
* blockproc<br />
** The name-value input arguments have not yet been implemented.<br />
* colfilt<br />
** the option to split the image in smaller blocks before performing the im2col and filtering is ignored. Since that option only allows to use less memory and has no effect on the output is only important for sliding filtering with big blocks size.<br />
* impixel<br />
** interactive selection of points (less than 2 input arguments) is not yet implemented. Ability to create such UIs needs to be implemented in Octave core first.<br />
* imcrop<br />
** messing around with alternative coordinate systems (XData and YData) are not yet implemented.<br />
* imwrap<br />
** no supports for SmoothEdges option<br />
* hough<br />
** no RhoResolution option<br />
<br />
=== Contributing ===<br />
* It'd help to group the missing functions above, as per [http://www.mathworks.com/help/images/functionlist.html] (similar to what was done in the [[signal package]] wiki page); please keep the original alphabetical list intact.<br />
<br />
=== Open Bugs ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! bug !! bug title !! status<br />
|-<br />
| {{bug|38085}} || image package: fails to build with --enable-64 (entropyfilt) || Confirmed <br />
|-<br />
| {{bug|38087}}|| image package: graycomatrix incompatibilities with matlab || None<br />
|-<br />
| {{bug|38345}}|| image package: __spatial_filtering__() always returns class double || Confirmed<br />
|-<br />
| {{bug|41674}}|| image package: temporary arrays in imresize are doubles || None<br />
|-<br />
| {{bug|43218}}|| image package: imshear causes more signal spread than expected and inconsistent vertical offset || None<br />
|-<br />
| {{bug|44396}}|| image package: bwmorph shrink does not preserve Euler number || Confirmed<br />
|-<br />
| {{bug|44799}}|| image package: imrotate chrashes when using 'spline' as interpolation method || Confirmed<br />
|-<br />
| {{bug|44831}}|| image package: imrotate - different dimensions of output matrix || Confirmed<br />
|-<br />
| {{bug|45088}}|| image package: rangefilt requires domain and image to have equal number of dimensions || Patch Reviewed<br />
|-<br />
| {{bug|46745}}|| image package: imresize default method (bicubic) Matlab incompatible for the border pixels|| None<br />
|-<br />
| {{bug|48529}}|| image package: compilation warnings under Mac OSX|| None<br />
|-<br />
| {{bug|50071}}|| OF image: bwfill(...,4) in Octave behaves like bwfill(...,8) in MATLAB and vice versa|| None<br />
|-<br />
| {{bug|50151}}|| image package: normxcorr2 is not compatible with Matlab|| None<br />
|-<br />
| {{bug|50188}}|| image package: poly2mask does incompatible rounding|| None<br />
|-<br />
| {{bug|50257}}|| image package: imtranslate is not Matlab compatible|| Confirmed<br />
|-<br />
| {{bug|50341}}|| Missing Function imrect in image package|| None<br />
|-<br />
| {{bug|50429}}|| image package: xyz2lab changed slightly in Matlab (and other color conversion functions)|| None <br />
|-<br />
| {{bug|50656}}|| image package: bwerode does not return right size when there's more dimensions on conn || None<br />
|-<br />
| {{bug|50708}}|| image package: add demosaic.m|| Patch Submitted<br />
|-<br />
| {{bug|50732}} || Image package: infinite error loop when assigning a strel (class) object to a vector|| Confirmed<br />
|-<br />
| {{bug|50783}} || image package: imlincomb is not compatible with Matlab || Patch submitted<br />
|-<br />
| {{bug|50874}} || bwdist call causes application crash || Confirmed<br />
|-<br />
| {{bug|51420}} || [octave forge] (image) imrotate is less tolerant to missing argument than Matlab || None<br />
|-<br />
| {{bug|51719}} || [octave forge] (image) watershed unit test failure || None<br />
|-<br />
| {{bug|51769}} || [octave forge] (image) imresize bilinear interpolation inaccurate || Patch Submitted<br />
|-<br />
| {{bug|51884}} || [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border) || None<br />
|-<br />
| {{bug|51979}} || [octave forge] (image) Failing unit test for impyramid || None<br />
|-<br />
| {{bug|51980}} || [octave forge] (image) Failing unit test for edge|| None<br />
|-<br />
| {{bug|51981}} || [octave forge] (image) Failing unit test for otf2psf|| None<br />
|-<br />
| {{bug|51982}} || [octave forge] (image) Failing unit test for nlfilter|| None<br />
|-<br />
| {{bug|52006}} || [octave forge] (image) 'makecform' feature request || Confirmed<br />
|-<br />
| {{bug|52119}} || [octave forge] (image) Add 'reflect' padding option to imfilter || None<br />
|-<br />
| {{bug|52715}} || [octave forge] (image) Add full data range option to ycbcrfunc conversions || None<br />
|-<br />
| {{bug|52933}} || [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results || Patch Submitted<br />
|-<br />
| {{bug|52959}} || [octave-forge] (image) histeq is not compatible with Matlab || None<br />
|-<br />
| {{bug|53090}} || [octave-forge] (image) imhist fails in dev version due to changes in colorbar || None<br />
|-<br />
| {{bug|53309}} || [octave forge] (image) imrotate of +/-90 degrees results in black image when 'crop' and RGB image as input || In Progress<br />
|-<br />
|}<br />
<br />
=== Patches ===<br />
<br />
* {{patch|8059}}: [new function for image package] ranktf.m<br />
* {{patch|8060}}: [image package new function] whitepoint.m<br />
* {{patch|8722}}: implement impixelinfo and impixelinfoval<br />
* {{patch|8813}}: image package: Extended image I/O for Analyze 7.5 format to handle big-endian images<br />
* {{patch|8866}}: image package: add metainfo.xml file for Gnome Software<br />
* {{patch|8571}}: image package: three deconvolution routines (Wiener, RL, RLTV)<br />
* {{patch|8824}}: added affine2d class<br />
* {{patch|9235}}: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)<br />
* {{patch|9244}}: image package: regionprops.m - new properties ConvexHull, ConvexImage, ConvexArea, Solidity<br />
* {{patch|9354}}: image package: new function wiener2.m<br />
* {{patch|9360}}: image package: new function otsuthresh.m<br />
* {{patch|9365}}: image package: new function deconvwnr.m<br />
* {{patch|9407}}: image package: new function houghpeaks.m<br />
* {{patch|9412}}: image package: new function houghlines.m<br />
* {{patch|9509}}: Image package: simple implementation of roipoly function<br />
<br />
== Image Processing Functions ==<br />
<br />
{{Note| This section is still under construction so the list is incomplete.}}<br />
<br />
This is a list of Image Processing functions by topic including: missing functions, related bugs and patches, and some alternatives.<br />
<br />
Note: <br />
<br />
=== Basic Read and Write Image Files ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives !! Notes<br />
|- <br />
| imfinfo || function is in Octave core || || ||<br />
|- <br />
| imread|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imread] from [https://github.com/kyamagu/mexopencv mexopencv] || <br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|- <br />
| imwrite|| function is in Octave core || || [http://kyamagu.github.io/mexopencv/matlab/imread.html cv.imwrite] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
in case of color image, the color order of Octave is RGB/RGBA while OpenCV color order is BGR/BGRA<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''dicomanon, dicomdisp, dicomuid, dpxinfo, dpxread, interfileinfo, interfileread, nitfinfo, nitfread<br />
''<br />
<br />
=== High Dynamic Range Images - ''Not implemented'' ===<br />
<br />
=== Large Image Files - ''Not implemented'' ===<br />
<br />
=== Type Conversion ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| adaptthresh || - || || [http://kyamagu.github.io/mexopencv/matlab/adaptiveThreshold.html cv.adaptiveThreshold] from [https://github.com/kyamagu/mexopencv mexopencv]|| <br />
|-<br />
| demosaic || - || {{bug|50708}} || [http://kyamagu.github.io/mexopencv/matlab/demosaicing.html cv.demosaicing] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| gray2ind || function is in Octave core || || ||<br />
|-<br />
| grayslice || < 1.0.0 || || ||<br />
|-<br />
| graythresh || 1.0.0 || || || Octave version has more methods<br />
|-<br />
| im2double || 1.0.0 || || ||<br />
|-<br />
| im2int16 || 2.0.0 || || ||<br />
|-<br />
| im2java2d || - || || ||<br />
|-<br />
| im2single || 2.0.0 || || || <br />
|-<br />
| im2uint16 || 1.0.0 || || || <br />
|-<br />
| im2uint8 || 1.0.0 || || || <br />
|-<br />
| imbinarize || - || || imbinarize (I) is equivalent to im2bw(I, graythresh(I)), <br />
another option is [http://kyamagu.github.io/mexopencv/matlab/threshold.html cv.threshold] from [https://github.com/kyamagu/mexopencv mexopencv] <br />
||<br />
|-<br />
| imcast || 2.4.0 || || || Octave Only<br />
|-<br />
| imquantize || 2.6.0 || || ||<br />
|-<br />
| ind2gray || function is in Octave core || || ||<br />
|-<br />
| ind2rgb || function is in Octave core || || ||<br />
|-<br />
| label2rgb || 1.0.0 || || ||<br />
|-<br />
| mat2gray || < 1.0.0 || || ||<br />
|-<br />
| multithresh || - || || ||<br />
|-<br />
| otsuthresh || - || {{patch|9360}} || graythresh || otsuthresh(hist) is equivalent to graythresh (hist)<br />
|-<br />
| rgb2gray || < 1.0.0 || || ||<br />
|-<br />
| rgb2ind || function is in Octave core || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''demosaic''<br />
<br />
=== Color ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| lab2double || - || || || <br />
|-<br />
| lab2rgb || - || || || <br />
|-<br />
| lab2uint16 || - || || || <br />
|-<br />
| lab2uint8 || - || || || <br />
|-<br />
| lab2xyz || - || || || <br />
|-<br />
| ntsc2rgb || function is in Octave core || || || <br />
|-<br />
| rgb2lab || - || || || <br />
|-<br />
| rgb2ntsc || function is in Octave core || || || <br />
|-<br />
| rgb2xyz || - || || || <br />
|-<br />
| rgb2ycbcr || - || || || <br />
|-<br />
| xyz2lab || - || || || <br />
|-<br />
| xyz2rgb || - || || || <br />
|-<br />
| ycbcr2rgb || - || || || <br />
|-<br />
|}<br />
<br />
'''Missing:''' ''applycform, chromadapt, colorangle, colorcloud, iccfind, iccread, iccroot, iccwrite, illumgray, illumpca, illumwhite, imapprox, isicc, lin2rgb, makecform, rgb2lin, whitepoint, xyz2double, xyz2uint16''<br />
<br />
=== Synthetic Images ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| checkerboard || - || || ||<br />
|-<br />
| imnoise || - || || ||<br />
|-<br />
| phantom || - || || ||<br />
|-<br />
|}<br />
<br />
=== Basic Display ===<br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imshow || function is in Octave core || || ||<br />
|-<br />
| montage || - || || ||<br />
|-<br />
|}<br />
<br />
'''Missing:''' ''imfuse, immovie, implay, imshowpair, iptgetpref, iptprefs, iptsetpref, warp''<br />
<br />
=== Image Filtering === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| bwareafilt|| 2.4.0 || || ||<br />
|-<br />
| bwpropfilt || 2.4.0 || || ||<br />
|-<br />
| convmtx2 || - || || ||<br />
|-<br />
| entropyfilt || 1.0.9 || {{patch|9235}} || ||<br />
|-<br />
| fibermetric ||- || || ||<br />
|-<br />
| freqz2 || -|| || ||<br />
|-<br />
| fsamp2 || - || || ||<br />
|-<br />
| fspecial || 1.0.0 || || ||<br />
|-<br />
| ftrans2 || - || || ||<br />
|-<br />
| fwind1 || - || || ||<br />
|-<br />
| fwind2 || - || || ||<br />
|-<br />
| gabor || - || || ||<br />
|- <br />
| imboxfilt || - || || ||<br />
|-<br />
| imboxfilt3 || - || || ||<br />
|-<br />
| imfilter || 1.0.5 || || || <br />
|- <br />
| imgaborfilt || - || || ||<br />
|-<br />
| imgaussfilt || - || || ||<br />
|-<br />
| imgaussfilt3 || - || || ||<br />
|-<br />
| imguidedfilter || - || || ||<br />
|-<br />
| imsmooth|| 1.0.5 || || || Octave only<br />
|-<br />
| integralBoxFilter || - || || ||<br />
|- <br />
| integralBoxFilter3 ||- || || ||<br />
|- <br />
| integralImage ||- || || [http://kyamagu.github.io/mexopencv/matlab/integral.html cv.integral] from [https://github.com/kyamagu/mexopencv mexopencv] ||<br />
|- <br />
| integralImage3 || - || || ||<br />
|- <br />
| medfilt2 || < 1.0.0 || {{patch|9235}} || ||<br />
|- <br />
| medfilt3 || - || || ||<br />
|- <br />
| nlfilter || < 1.0.0 || || ||<br />
|- <br />
| normxcorr2 || 2.0.0 || {{bug|50151}} || ||<br />
|- <br />
| ordfilt2 || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| padarray || < 1.0.0 || || ||<br />
|- <br />
| rangefilt || 1.0.9 || {{bug|45088}} {{patch|9235}} || ||<br />
|- <br />
| stdfilt || 1.0.9 || {{patch|9235}} || ||<br />
|- <br />
| wiener2 || dev || || || <br />
|-<br />
|}<br />
<br />
=== Image Arithmetic === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| imabsdiff || 2.0.0 || || ||<br />
|- <br />
| imadd || 2.0.0 || || ||<br />
|- <br />
| imapplymatrix || - || || ||<br />
|- <br />
| imcomplement || 1.0.6 || || ||<br />
|- <br />
| imdivide || 2.0.0 || || ||<br />
|- <br />
| imlincomb || 2.0.0 || {{bug|50783}} || ||<br />
|- <br />
| immultiply || 2.0.0 || || ||<br />
|-<br />
| imsubtract || 2.0.0 || || ||<br />
|-<br />
|}<br />
<br />
=== Morphological Operations === <br />
<br />
{| class="wikitable" style="text-align: center"<br />
|-<br />
! Function !! Octave Package Version !! Related Bugs and Patches !! Alternatives || Notes<br />
|- <br />
| applylut || < 1.0.0 || || ||<br />
|- <br />
| bwareaopen || 2.2.0 || || ||<br />
|- <br />
| bwhitmiss || < 1.0.0 || || ||<br />
|- <br />
| bwlookup || -- || || ||<br />
|-<br />
| bwmorph || < 1.0.0 || {{bug|51884}} || ||<br />
|- <br />
| bwulterode || -- || || ||<br />
|- <br />
| conndef || < 1.0.0 || || ||<br />
|- <br />
| imbothat || 2.0.0 || || ||<br />
|- <br />
| imclearborder || 2.4.0 || || ||<br />
|- <br />
| imclose || < 1.0.0 || || ||<br />
|- <br />
| imdilate || < 1.0.0 || || ||<br />
|- <br />
| imerode || < 1.0.0 || || ||<br />
|- <br />
| imextendedmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imextendedmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imfill || 2.6.0 || || ||<br />
|- <br />
| imhmax || dev || {{patch|9488}}|| ||<br />
|- <br />
| imhmin || dev || {{patch|9488}} || ||<br />
|- <br />
| imimposemin || dev || {{patch|9488}}|| ||<br />
|- <br />
| imopen || < 1.0.0 || || ||<br />
|- <br />
| imreconstruct || 2.4.0 || || ||<br />
|- <br />
| imregionalmax || 2.4.0 || || ||<br />
|- <br />
| imregionalmin || 2.4.0 || || ||<br />
|- <br />
| imtophat || < 1.0.0 || || ||<br />
|- <br />
| iptcheckconn || 2.0.0 || || ||<br />
|- <br />
| offsetstrel || -- || || ||<br />
|- <br />
| strel || 2.2.0 || {{bug|50732}} || ||<br />
|- <br />
| watershed || 2.6.0 || || ||<br />
|-<br />
|}<br />
<br />
[[Category:Octave-Forge]]</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=User:Ricardofantin&diff=4359
User:Ricardofantin
2014-03-08T20:42:34Z
<p>Ricardofantin: /* A: An introduction */</p>
<hr />
<div>== A: An introduction ==<br />
* Please describe yourself in three sentences, one of them regarding your current studies.<br />
I'm a computer engineering student and will finish my study in may/2014. Free Software always take my attention because the easy installation of packages allow me to install one of the best image editor/3d modelling/video editor/IDE very fast. I like to learn new things and challenging tasks.<br />
** Which languages do you speak?<br />
I'm a native Brazilian Portuguese speaker, I also speak English fairly well and I'm studing Spanish and German.<br />
** What's your overall background? ''The general field you work in or are studying, e.g. computer science, physics, artificial intelligence, control theory...''<br />
I like computer programming and math in second place. I did some research in Geometric Algebra over two years in the past, there is a Matlab package with a geometric algebra tutorial that doesn't work in octave because of some input functions. I want finish my graduate course and start an Master of Science course and work with octave is a great way to improve my curriculum. My main experience is in Image Processing, but I have interest in other areas like control or numerical computation.<br />
* Why do you want to participate in the Google Summer of Code? What do you hope to gain by doing so?<br />
Google Summer of Code is a great place to start collaborate with big and complex free software. The preparation time to code for a first time in a big project only is justifiable if there is much improvements wanted by the programmer in that software. Octave take my attention because Matlab is the proprietary software that my professors more incentive to use even without the property licence, Octave should replace Matlab in every application even the graphical ones. Learn to code big softwares and work in a community is my main interest, fame cold be a second objective, the money is also a good incentive.<br />
** Please also describe your previous experience with the GSoC, if any. ''Includes any community-bonding, mentor experience or application, not necessarily accepted. We use this subquestion to identify which students are unfamiliar with how the program goes, providing further support. It has no negative impact on your rating!''<br />
I tried to contribute to mono project around seven years ago, in that moment I wanted to code something, but I was mentored to write documentation. I learned alot about the mono and translated much material to Brazilian Portuguese, but I didn't learned to code, which was my objective.<br />
* Why are you choosing Octave?<br />
Octave is a project that involves programming and mathematics which are my main study subjects. I saw many project ideas, and Octave's among the ones that would help me more in my curriculum and free software evangelism.<br />
<br />
== C: Contact ==<br />
* Please state the (unique and identical where possible) nick you use on IRC and any other communication channel related to Octave. ''We really want unique nicks. You might want to bold it.''<br />
My nickname in FreeNode, e-mail list and octave wiki is '''ricardofantin'''.<br />
* Which time zone do you live in? Will that change over GSoC duration? ''Perhaps DST adjustment or a relocation. Note that both UTC and GMT are not aware of daylight saving time! Please state UTC+x or -x.''<br />
I live in UTC-3.<br />
<br />
* Please state the timeframe (in UTC+0) when you feel most comfortable working during GSoC. Where are your time buffers? ''Example: I usually code around 9.00 to 18.00 and could also try to start earlier (~7.00) for few days ;-)''<br />
I prefer to work from 12.00 until 22.00 .<br />
<br />
== E: Coding experience ==<br />
* Please describe your experience with C++, Octave or Matlab m-scripts, OpenGL and Qt.<br />
I have plenty experience in object oriented software programming, mainly in Java. I had many classes that teach/uses C++ and Matlab. I participate in many programming competitions using C++. In my final coursework I'm using C++, Qt and OpenCV.<br />
* Please describe your experience with other programming languages.<br />
I learned Visual Basic alone many years ago. HTML, javascript and css are also in my portfolio. In my University courses I used C, PHP, Java and many others. For large projects, involving threads, sockets and GUI I used java. In one web site application I used PHP and used C in embed devices and Data Structures.<br />
* Please describe your experience with being in a development team. ''Do you have experience working with open source or free projects?''<br />
In university the major projects intended to be done in groups. I participated in translation of some packages in Ubuntu and helped in the Portuguese forum. Existed a project called Mono Brasil which had a visual basic.net compiler and many documentation in Portuguese, I helped in translation, answered some questions in forum and in e-mail list. I tried to make a wrapper for autodia read argouml files, but it didn't work because argouml xml files weren't read by sympleXML (a Perl library).<br />
* Please describe the biggest project you have written code for and what you learned by doing so. Also describe your role in that project over time.<br />
There was one that consist of a omnidirectional robot project that have planning, checkpoints and much work distributed in five members. In this project the time used in communication was enormous and yet the time cannot be spend in a better way. I worked in the GUI and in the wire-less communication between the computer and the robot. The project helped-me gain experience in big projects and in group work.<br />
* Please state the commits and patches you already contributed to Octave. ''This question (one of the most important parts by the way) is the only part of your application our wiki admins will edit for you even after the application deadline. Code sometimes speaks louder than many words do.''<br />
<br />
<br />
== F: Feeling fine ==<br />
* Please describe (in short) your experience with the following tools: ''We only use this question to determine where you need guidance, not for rating! We by no means expect you to be familiar with all of these and you'll won't necessarily need them while working with us.''<br />
I have experience in IRC and Mailing lists. I work a little with SVN. Already worked with MediaWiki. My preferred editor is vim with make and sometimes gdb. Already used many IDE including QTCreator.<br />
Octave is one of Free Software Foundation high priority projects and it's important to my too. I would continue coding to the project if my communication with the community go fine.<br />
** IRC and mailing lists<br />
** Mercurial or other source code management systems<br />
** Mediawiki or other wiki software<br />
** make, gcc, gdb or other development tools<br />
* What will make you actively stay in our community after this GSoC is over? ''You can also tell us after applications close and we'll happily try to fulfill :-)''<br />
<br />
<br />
== O: Only out of interest ==<br />
* Did you ever hear about Octave before? <br />
** If so, when and where? How far have you been involved already?<br />
** If not, where would you expect or advise us to do advertising?<br />
I don't remember the first time I listened about Octave, I used Octave in all homework where I was supposed to use Matlab. I think professors should use Octave, but the major of them prefer Matlab. I can’t think a place to advise free and easily that would increases it uses.<br />
* What was the first question concerning Octave you could not find an answer to rather quickly? ''Of course more than one question can be stated. We try to improve based on this each year! Includes learning how to use it, code, website, GSoC application, …''<br />
In Matlab communication toolbox is possible to simulate some data communication using blocks, I don't know if it's possible with Octave even using only the command line.<br />
I tried some time ago, create a matrix of Objects, but it only allowed me to create a matrix of double. Then I used containers, but it was very slow.<br />
<br />
== P: Prerequisites ==<br />
* Please state the operating system you work with.<br />
** If you have access to more than one, please state them and the conditions under which you are granted this access.<br />
* Please estimate an average time per day you will be able to ''(if separated)'' access<br />
** an internet connection<br />
** a computer<br />
** a computer with your progressing work on<br />
* Please describe the degree up to which you can install new software on computers you have access to.<br />
I use Ubuntu 13:10 in my personal computer. I have also a Windows 7 in my personal computer. In my notebook I have Ubuntu 12:04. In all of these I have full access to install software.<br />
During the program I want to stay at home, and in home I always have access to a computer with internet.<br />
<br />
== S: Self-assessment ==<br />
* Please describe how useful criticism looks from your point of view as committing student.<br />
Criticism means that someone spend his time looking my work, so he have the right to criticism. But I don't like suggestions about the whole thing, tips in specific point's are more welcome.<br />
* How autonomous are you when developing? ''If you answer both subquestions with "Yes, definitely", we are a tad confused. ;-)''<br />
I prefer to search in Google before ask for help. However questions that my orientator can answer fast are worth being asked.<br />
** Do you like to discuss changes intensively and not start coding until you know what you want to do?<br />
I only start to code with a initial class diagram, but I never discussed much before start coding.<br />
** Do you like to code a proof of concept to 'see how it turns out', modifying that and taking the risk of having work thrown away if it doesn't match what the project or original proponent had in mind?<br />
Some code can definitely be written before a discuss, this code includes examples of uses of other software parts and use of library’s. In complex software's I prefer the spiral development model.<br />
<br />
== Y: Your task [TODO]==<br />
* Did you select a task from our list of proposals and ideas?<br />
I choosed the Interface to Electronic Circuit Simulator.<br />
http://wiki.octave.org/Summer_of_Code_Project_Ideas#Interface_to_Electronic_Circuit_Simulator<br />
** If yes, what task did you choose? Please describe what part of it you especially want to focus on if you can already provide this information. ''Please also wiki-link the page for your elaborated proposal here.''<br />
** If you apply for a task you have added yourself instead, please describe this task, its scope and people you already talked to concerning it. What field of tasks did you miss on the list?<br />
* Please provide a rough estimated timeline for your work on the task. ''This should include the GSoC midterms and personal commitments like exams or vacation ("non-coding time"). Optionally include two or three milestones you expect.''</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=User:Ricardofantin&diff=4341
User:Ricardofantin
2014-03-07T02:33:28Z
<p>Ricardofantin: </p>
<hr />
<div>== A: An introduction ==<br />
* Please describe yourself in three sentences, one of them regarding your current studies.<br />
I'm a computer engineering student and will finish my study in may/2014. My favorite . Free Software always take my attention because the easy installation of packages allow me to install one of the best image editor/3d modelling/video editor/IDE very fast.<br />
** Which languages do you speak?<br />
I'm a native Brazilian Portuguese speaker, I also speak English fairly well and I'm studing Spanish and German.<br />
** What's your overall background? ''The general field you work in or are studying, e.g. computer science, physics, artificial intelligence, control theory...''<br />
I like computer programming and math in second place. I did some research in Geometric Algebra over two years in the past, there is a Matlab package with a geometric algebra tutorial that doesn't work in octave because of some input functions. I want finish my graduate course and start an Master of Science course and work with octave is a great way to improve my curriculum. My main experience is in Image Processing, but I have interest in other areas like control or numerical computation.<br />
* Why do you want to participate in the Google Summer of Code? What do you hope to gain by doing so?<br />
Google Summer of Code is a great place to start collaborate with big and complex free software. The preparation time to code for a first time in a big project only is justifiable if there is much improvements wanted by the programmer in that software. Octave take my attention because Matlab is the proprietary software that my professors more incentive to use even without the property licence, Octave should replace Matlab in every application even the graphical ones. Learn to code big softwares and work in a community is my main interest, fame cold be a second objective, the money is also a good incentive.<br />
** Please also describe your previous experience with the GSoC, if any. ''Includes any community-bonding, mentor experience or application, not necessarily accepted. We use this subquestion to identify which students are unfamiliar with how the program goes, providing further support. It has no negative impact on your rating!''<br />
I tried to contribute to mono project around seven years ago, in that moment I wanted to code something, but I was mentored to write documentation. I learned alot about the mono and translated much material to Brazilian Portuguese, but I didn't learned to code, which was my objective.<br />
* Why are you choosing Octave?<br />
Octave is a project that involves programming and mathematics which are my main study subjects. I saw many project ideas, and Octave's among the ones that would help me more in my curriculum and free software evangelism.<br />
<br />
== C: Contact ==<br />
* Please state the (unique and identical where possible) nick you use on IRC and any other communication channel related to Octave. ''We really want unique nicks. You might want to bold it.''<br />
My nickname in FreeNode, e-mail list and octave wiki is '''ricardofantin'''.<br />
* Which time zone do you live in? Will that change over GSoC duration? ''Perhaps DST adjustment or a relocation. Note that both UTC and GMT are not aware of daylight saving time! Please state UTC+x or -x.''<br />
I live in UTC-3.<br />
<br />
* Please state the timeframe (in UTC+0) when you feel most comfortable working during GSoC. Where are your time buffers? ''Example: I usually code around 9.00 to 18.00 and could also try to start earlier (~7.00) for few days ;-)''<br />
I prefer to work from 12.00 until 22.00 .<br />
<br />
== E: Coding experience ==<br />
* Please describe your experience with C++, Octave or Matlab m-scripts, OpenGL and Qt.<br />
I have plenty experience in object oriented software programming, mainly in Java. I had many classes that teach/uses C++ and Matlab. I participate in many programming competitions using C++. In my final coursework I'm using C++, Qt and OpenCV.<br />
* Please describe your experience with other programming languages.<br />
I learned Visual Basic alone many years ago. HTML, javascript and css are also in my portfolio. In my University courses I used C, PHP, Java and many others. For large projects, involving threads, sockets and GUI I used java. In one web site application I used PHP and used C in embed devices and Data Structures.<br />
* Please describe your experience with being in a development team. ''Do you have experience working with open source or free projects?''<br />
In university the major projects intended to be done in groups. I participated in translation of some packages in Ubuntu and helped in the Portuguese forum. Existed a project called Mono Brasil which had a visual basic.net compiler and many documentation in Portuguese, I helped in translation, answered some questions in forum and in e-mail list. I tried to make a wrapper for autodia read argouml files, but it didn't work because argouml xml files weren't read by sympleXML (a Perl library).<br />
* Please describe the biggest project you have written code for and what you learned by doing so. Also describe your role in that project over time.<br />
There was one that consist of a omnidirectional robot project that have planning, checkpoints and much work distributed in five members. In this project the time used in communication was enormous and yet the time cannot be spend in a better way. I worked in the GUI and in the wire-less communication between the computer and the robot. The project helped-me gain experience in big projects and in group work.<br />
* Please state the commits and patches you already contributed to Octave. ''This question (one of the most important parts by the way) is the only part of your application our wiki admins will edit for you even after the application deadline. Code sometimes speaks louder than many words do.''<br />
<br />
<br />
== F: Feeling fine ==<br />
* Please describe (in short) your experience with the following tools: ''We only use this question to determine where you need guidance, not for rating! We by no means expect you to be familiar with all of these and you'll won't necessarily need them while working with us.''<br />
I have experience in IRC and Mailing lists. I work a little with SVN. Already worked with MediaWiki. My preferred editor is vim with make and sometimes gdb. Already used many IDE including QTCreator.<br />
Octave is one of Free Software Foundation high priority projects and it's important to my too. I would continue coding to the project if my communication with the community go fine.<br />
** IRC and mailing lists<br />
** Mercurial or other source code management systems<br />
** Mediawiki or other wiki software<br />
** make, gcc, gdb or other development tools<br />
* What will make you actively stay in our community after this GSoC is over? ''You can also tell us after applications close and we'll happily try to fulfill :-)''<br />
<br />
<br />
== O: Only out of interest ==<br />
* Did you ever hear about Octave before? <br />
** If so, when and where? How far have you been involved already?<br />
** If not, where would you expect or advise us to do advertising?<br />
I don't remember the first time I listened about Octave, I used Octave in all homework where I was supposed to use Matlab. I think professors should use Octave, but the major of them prefer Matlab. I can’t think a place to advise free and easily that would increases it uses.<br />
* What was the first question concerning Octave you could not find an answer to rather quickly? ''Of course more than one question can be stated. We try to improve based on this each year! Includes learning how to use it, code, website, GSoC application, …''<br />
In Matlab communication toolbox is possible to simulate some data communication using blocks, I don't know if it's possible with Octave even using only the command line.<br />
I tried some time ago, create a matrix of Objects, but it only allowed me to create a matrix of double. Then I used containers, but it was very slow.<br />
<br />
== P: Prerequisites ==<br />
* Please state the operating system you work with.<br />
** If you have access to more than one, please state them and the conditions under which you are granted this access.<br />
* Please estimate an average time per day you will be able to ''(if separated)'' access<br />
** an internet connection<br />
** a computer<br />
** a computer with your progressing work on<br />
* Please describe the degree up to which you can install new software on computers you have access to.<br />
I use Ubuntu 13:10 in my personal computer. I have also a Windows 7 in my personal computer. In my notebook I have Ubuntu 12:04. In all of these I have full access to install software.<br />
During the program I want to stay at home, and in home I always have access to a computer with internet.<br />
<br />
== S: Self-assessment ==<br />
* Please describe how useful criticism looks from your point of view as committing student.<br />
Criticism means that someone spend his time looking my work, so he have the right to criticism. But I don't like suggestions about the whole thing, tips in specific point's are more welcome.<br />
* How autonomous are you when developing? ''If you answer both subquestions with "Yes, definitely", we are a tad confused. ;-)''<br />
I prefer to search in Google before ask for help. However questions that my orientator can answer fast are worth being asked.<br />
** Do you like to discuss changes intensively and not start coding until you know what you want to do?<br />
I only start to code with a initial class diagram, but I never discussed much before start coding.<br />
** Do you like to code a proof of concept to 'see how it turns out', modifying that and taking the risk of having work thrown away if it doesn't match what the project or original proponent had in mind?<br />
Some code can definitely be written before a discuss, this code includes examples of uses of other software parts and use of library’s. In complex software's I prefer the spiral development model.<br />
<br />
== Y: Your task [TODO]==<br />
* Did you select a task from our list of proposals and ideas?<br />
I choosed the Interface to Electronic Circuit Simulator.<br />
http://wiki.octave.org/Summer_of_Code_Project_Ideas#Interface_to_Electronic_Circuit_Simulator<br />
** If yes, what task did you choose? Please describe what part of it you especially want to focus on if you can already provide this information. ''Please also wiki-link the page for your elaborated proposal here.''<br />
** If you apply for a task you have added yourself instead, please describe this task, its scope and people you already talked to concerning it. What field of tasks did you miss on the list?<br />
* Please provide a rough estimated timeline for your work on the task. ''This should include the GSoC midterms and personal commitments like exams or vacation ("non-coding time"). Optionally include two or three milestones you expect.''</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=User:Ricardofantin&diff=4340
User:Ricardofantin
2014-03-07T01:30:37Z
<p>Ricardofantin: /* C: Contact */</p>
<hr />
<div>== A: An introduction ==<br />
* Please describe yourself in three sentences, one of them regarding your current studies.<br />
I'm a computer engineering student and will finish my study in may/2014. I live in Brazil with my parents and brothers. Free Software always take my attention because the easy installation of packages allow me to install one of the best image editor/3d modelling/video editor/IDE very fast.<br />
** Which languages do you speak?<br />
I'm a native Brazilian Portuguese speaker and studied the basic of Spanish and German. Furthermore, you can judge my English by reading this page.<br />
** What's your overall background? ''The general field you work in or are studying, e.g. computer science, physics, artificial intelligence, control theory...''<br />
I like computer programming and math in second place. I did some research in Geometric Algebra over two years in the past, there is a Matlab package with a geometric algebra tutorial that doesn't work in octave because of some input functions. I want finish my graduate course and start an Master of Science course and work with octave is a great way to improve my curriculum. My main experience is in Image Processing, but I have interest in other areas like control or numerical computation.<br />
* Why do you want to participate in the Google Summer of Code? What do you hope to gain by doing so?<br />
Google Summer of Code is a great place to start collaborate with big and complex free software. The preparation time to code for a first time in a big project only is justifiable if there is much improvements wanted by the programmer in that software. Octave take my attention because Matlab is the proprietary software that my professors more incentive to use even without the property licence, Octave should replace Matlab in every application even the graphical ones. Learn to code big softwares and work in a community is my main interest, fame cold be a second objective, the money is also a good incentive.<br />
** Please also describe your previous experience with the GSoC, if any. ''Includes any community-bonding, mentor experience or application, not necessarily accepted. We use this subquestion to identify which students are unfamiliar with how the program goes, providing further support. It has no negative impact on your rating!''<br />
I tried to contribute to mono project around seven years ago, in that moment I wanted to code something, but I was mentored to write documentation. I learned alot about the mono and translated much material to Brazilian Portuguese, but I didn't learned to code, which was my objective.<br />
* Why are you choosing Octave?<br />
Octave is a project that involves programming and mathematics which are my main study subjects. I saw many project ideas, and Octave's among the ones that would help me more in my curriculum and free software evangelism.<br />
<br />
== C: Contact ==<br />
* Please state the (unique and identical where possible) nick you use on IRC and any other communication channel related to Octave. ''We really want unique nicks. You might want to bold it.''<br />
My nickname in FreeNode, e-mail list and octave wiki is '''ricardofantin'''.<br />
* Which time zone do you live in? Will that change over GSoC duration? ''Perhaps DST adjustment or a relocation. Note that both UTC and GMT are not aware of daylight saving time! Please state UTC+x or -x.''<br />
I live in UTC-3.<br />
<br />
* Please state the timeframe (in UTC+0) when you feel most comfortable working during GSoC. Where are your time buffers? ''Example: I usually code around 9.00 to 18.00 and could also try to start earlier (~7.00) for few days ;-)''<br />
I prefer to work from 12.00 until 22.00 .<br />
<br />
== E: Coding experience ==<br />
* Please describe your experience with C++, Octave or Matlab m-scripts, OpenGL and Qt.<br />
I have plenty experience in object oriented software programming, mainly in Java. I had many classes that teach/uses C++ and Matlab. I participate in many programming competitions using C++. In my final coursework I'm using C++, Qt and OpenCV.<br />
* Please describe your experience with other programming languages.<br />
I learned Visual Basic alone many years ago. HTML, javascript and css are also in my portfolio. In my University courses I used C, PHP, Java and many others. For large projects, involving threads, sockets and GUI I used java. In one web site application I used PHP and used C in embed devices and Data Structures.<br />
* Please describe your experience with being in a development team. ''Do you have experience working with open source or free projects?''<br />
In university the major projects intended to be done in groups. I participated in translation of some packages in Ubuntu and helped in the Portuguese forum. Existed a project called Mono Brasil which had a visual basic.net compiler and many documentation in Portuguese, I helped in translation, answered some questions in forum and in e-mail list. I tried to make a wrapper for autodia read argouml files, but it didn't work because argouml xml files weren't read by sympleXML (a Perl library).<br />
* Please describe the biggest project you have written code for and what you learned by doing so. Also describe your role in that project over time.<br />
There was one that consist of a omnidirectional robot project that have planning, checkpoints and much work distributed in five members. In this project the time used in communication was enormous. I worked in the GUI and in the wire-less communication between the computer and the robot. The project helped-me gain experience in big projects and in group work<br />
* Please state the commits and patches you already contributed to Octave. ''This question (one of the most important parts by the way) is the only part of your application our wiki admins will edit for you even after the application deadline. Code sometimes speaks louder than many words do.''<br />
<br />
<br />
== F: Feeling fine ==<br />
* Please describe (in short) your experience with the following tools: ''We only use this question to determine where you need guidance, not for rating! We by no means expect you to be familiar with all of these and you'll won't necessarily need them while working with us.''<br />
I have experience in IRC and Mailing lists. I work a little with SVN. Already worked with MediaWiki. My preferred editor is vim with make and sometimes gdb. Already used many IDE including QTCreator.<br />
Octave is one of Free Software Foundation high priority projects and it's important to my too. I would continue coding to the project if my communication with the community go fine.<br />
** IRC and mailing lists<br />
** Mercurial or other source code management systems<br />
** Mediawiki or other wiki software<br />
** make, gcc, gdb or other development tools<br />
* What will make you actively stay in our community after this GSoC is over? ''You can also tell us after applications close and we'll happily try to fulfill :-)''<br />
<br />
<br />
== O: Only out of interest ==<br />
* Did you ever hear about Octave before? <br />
** If so, when and where? How far have you been involved already?<br />
** If not, where would you expect or advise us to do advertising?<br />
I don't remember the first time I listen about Octave, I used Octave in all homework that I were supposed to use Matlab. I think professors should use Octave, but the major of them prefer Matlab. I can’t think a place to advise free and easy that would increases it uses.<br />
* What was the first question concerning Octave you could not find an answer to rather quickly? ''Of course more than one question can be stated. We try to improve based on this each year! Includes learning how to use it, code, website, GSoC application, …''<br />
In Matlab communication toolbox is possible to simulate some data communication using blocks, I don't know if it's possible with Octave even using only the command line.<br />
I tried some time ago, create a matrix of Objects, but it only allowed me to create a matrix of double. Then I used containers, but it was very slow.<br />
<br />
== P: Prerequisites ==<br />
* Please state the operating system you work with.<br />
** If you have access to more than one, please state them and the conditions under which you are granted this access.<br />
* Please estimate an average time per day you will be able to ''(if separated)'' access<br />
** an internet connection<br />
** a computer<br />
** a computer with your progressing work on<br />
* Please describe the degree up to which you can install new software on computers you have access to.<br />
I use Ubuntu 13:10 in my personal computer. I have also a Windows 7 in my personal computer. In my notebook I have Ubuntu 12:04. In all of these I have full access to install software.<br />
During the program I want to stay at home, and in home I always have access to a computer with internet.<br />
<br />
== S: Self-assessment ==<br />
* Please describe how useful criticism looks from your point of view as committing student.<br />
Criticism means that some one spend his time looking my work, so he have the right to criticism. But I don't like suggestions about the whole thing, tips in specific point's are more welcome.<br />
* How autonomous are you when developing? ''If you answer both subquestions with "Yes, definitely", we are a tad confused. ;-)''<br />
I prefer to search in Google before ask for help. But questions with fast answers worth the orientation time.<br />
** Do you like to discuss changes intensively and not start coding until you know what you want to do?<br />
I only start to code with a initial class diagram, but I never discussed much before start to code.<br />
** Do you like to code a proof of concept to 'see how it turns out', modifying that and taking the risk of having work thrown away if it doesn't match what the project or original proponent had in mind?<br />
Some code can definitely be write before a discuss, this code includes examples of uses of other software parts and use of library’s. In complex software's I prefer the spiral development model.<br />
<br />
== Y: Your task ==<br />
* Did you select a task from our list of proposals and ideas?<br />
I choose the Interface to Electronic Circuit Simulator.<br />
http://wiki.octave.org/Summer_of_Code_Project_Ideas#Interface_to_Electronic_Circuit_Simulator<br />
** If yes, what task did you choose? Please describe what part of it you especially want to focus on if you can already provide this information. ''Please also wiki-link the page for your elaborated proposal here.''<br />
** If you apply for a task you have added yourself instead, please describe this task, its scope and people you already talked to concerning it. What field of tasks did you miss on the list?<br />
* Please provide a rough estimated timeline for your work on the task. ''This should include the GSoC midterms and personal commitments like exams or vacation ("non-coding time"). Optionally include two or three milestones you expect.''</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=User:Ricardofantin&diff=4339
User:Ricardofantin
2014-03-07T01:28:12Z
<p>Ricardofantin: /* A: An introduction */</p>
<hr />
<div>== A: An introduction ==<br />
* Please describe yourself in three sentences, one of them regarding your current studies.<br />
I'm a computer engineering student and will finish my study in may/2014. I live in Brazil with my parents and brothers. Free Software always take my attention because the easy installation of packages allow me to install one of the best image editor/3d modelling/video editor/IDE very fast.<br />
** Which languages do you speak?<br />
I'm a native Brazilian Portuguese speaker and studied the basic of Spanish and German. Furthermore, you can judge my English by reading this page.<br />
** What's your overall background? ''The general field you work in or are studying, e.g. computer science, physics, artificial intelligence, control theory...''<br />
I like computer programming and math in second place. I did some research in Geometric Algebra over two years in the past, there is a Matlab package with a geometric algebra tutorial that doesn't work in octave because of some input functions. I want finish my graduate course and start an Master of Science course and work with octave is a great way to improve my curriculum. My main experience is in Image Processing, but I have interest in other areas like control or numerical computation.<br />
* Why do you want to participate in the Google Summer of Code? What do you hope to gain by doing so?<br />
Google Summer of Code is a great place to start collaborate with big and complex free software. The preparation time to code for a first time in a big project only is justifiable if there is much improvements wanted by the programmer in that software. Octave take my attention because Matlab is the proprietary software that my professors more incentive to use even without the property licence, Octave should replace Matlab in every application even the graphical ones. Learn to code big softwares and work in a community is my main interest, fame cold be a second objective, the money is also a good incentive.<br />
** Please also describe your previous experience with the GSoC, if any. ''Includes any community-bonding, mentor experience or application, not necessarily accepted. We use this subquestion to identify which students are unfamiliar with how the program goes, providing further support. It has no negative impact on your rating!''<br />
I tried to contribute to mono project around seven years ago, in that moment I wanted to code something, but I was mentored to write documentation. I learned alot about the mono and translated much material to Brazilian Portuguese, but I didn't learned to code, which was my objective.<br />
* Why are you choosing Octave?<br />
Octave is a project that involves programming and mathematics which are my main study subjects. I saw many project ideas, and Octave's among the ones that would help me more in my curriculum and free software evangelism.<br />
<br />
== C: Contact ==<br />
* Please state the (unique and identical where possible) nick you use on IRC and any other communication channel related to Octave. ''We really want unique nicks. You might want to bold it.''<br />
My nickname in FreeNode, e-mail list and octave wiki is ricardofantin.<br />
* Which time zone do you live in? Will that change over GSoC duration? ''Perhaps DST adjustment or a relocation. Note that both UTC and GMT are not aware of daylight saving time! Please state UTC+x or -x.''<br />
I live in UTC-3<br />
<br />
* Please state the timeframe (in UTC+0) when you feel most comfortable working during GSoC. Where are your time buffers? ''Example: I usually code around 9.00 to 18.00 and could also try to start earlier (~7.00) for few days ;-)''<br />
I prefer to work from 12.00 until 22.00 .<br />
<br />
== E: Coding experience ==<br />
* Please describe your experience with C++, Octave or Matlab m-scripts, OpenGL and Qt.<br />
I have plenty experience in object oriented software programming, mainly in Java. I had many classes that teach/uses C++ and Matlab. I participate in many programming competitions using C++. In my final coursework I'm using C++, Qt and OpenCV.<br />
* Please describe your experience with other programming languages.<br />
I learned Visual Basic alone many years ago. HTML, javascript and css are also in my portfolio. In my University courses I used C, PHP, Java and many others. For large projects, involving threads, sockets and GUI I used java. In one web site application I used PHP and used C in embed devices and Data Structures.<br />
* Please describe your experience with being in a development team. ''Do you have experience working with open source or free projects?''<br />
In university the major projects intended to be done in groups. I participated in translation of some packages in Ubuntu and helped in the Portuguese forum. Existed a project called Mono Brasil which had a visual basic.net compiler and many documentation in Portuguese, I helped in translation, answered some questions in forum and in e-mail list. I tried to make a wrapper for autodia read argouml files, but it didn't work because argouml xml files weren't read by sympleXML (a Perl library).<br />
* Please describe the biggest project you have written code for and what you learned by doing so. Also describe your role in that project over time.<br />
There was one that consist of a omnidirectional robot project that have planning, checkpoints and much work distributed in five members. In this project the time used in communication was enormous. I worked in the GUI and in the wire-less communication between the computer and the robot. The project helped-me gain experience in big projects and in group work<br />
* Please state the commits and patches you already contributed to Octave. ''This question (one of the most important parts by the way) is the only part of your application our wiki admins will edit for you even after the application deadline. Code sometimes speaks louder than many words do.''<br />
<br />
<br />
== F: Feeling fine ==<br />
* Please describe (in short) your experience with the following tools: ''We only use this question to determine where you need guidance, not for rating! We by no means expect you to be familiar with all of these and you'll won't necessarily need them while working with us.''<br />
I have experience in IRC and Mailing lists. I work a little with SVN. Already worked with MediaWiki. My preferred editor is vim with make and sometimes gdb. Already used many IDE including QTCreator.<br />
Octave is one of Free Software Foundation high priority projects and it's important to my too. I would continue coding to the project if my communication with the community go fine.<br />
** IRC and mailing lists<br />
** Mercurial or other source code management systems<br />
** Mediawiki or other wiki software<br />
** make, gcc, gdb or other development tools<br />
* What will make you actively stay in our community after this GSoC is over? ''You can also tell us after applications close and we'll happily try to fulfill :-)''<br />
<br />
<br />
== O: Only out of interest ==<br />
* Did you ever hear about Octave before? <br />
** If so, when and where? How far have you been involved already?<br />
** If not, where would you expect or advise us to do advertising?<br />
I don't remember the first time I listen about Octave, I used Octave in all homework that I were supposed to use Matlab. I think professors should use Octave, but the major of them prefer Matlab. I can’t think a place to advise free and easy that would increases it uses.<br />
* What was the first question concerning Octave you could not find an answer to rather quickly? ''Of course more than one question can be stated. We try to improve based on this each year! Includes learning how to use it, code, website, GSoC application, …''<br />
In Matlab communication toolbox is possible to simulate some data communication using blocks, I don't know if it's possible with Octave even using only the command line.<br />
I tried some time ago, create a matrix of Objects, but it only allowed me to create a matrix of double. Then I used containers, but it was very slow.<br />
<br />
== P: Prerequisites ==<br />
* Please state the operating system you work with.<br />
** If you have access to more than one, please state them and the conditions under which you are granted this access.<br />
* Please estimate an average time per day you will be able to ''(if separated)'' access<br />
** an internet connection<br />
** a computer<br />
** a computer with your progressing work on<br />
* Please describe the degree up to which you can install new software on computers you have access to.<br />
I use Ubuntu 13:10 in my personal computer. I have also a Windows 7 in my personal computer. In my notebook I have Ubuntu 12:04. In all of these I have full access to install software.<br />
During the program I want to stay at home, and in home I always have access to a computer with internet.<br />
<br />
== S: Self-assessment ==<br />
* Please describe how useful criticism looks from your point of view as committing student.<br />
Criticism means that some one spend his time looking my work, so he have the right to criticism. But I don't like suggestions about the whole thing, tips in specific point's are more welcome.<br />
* How autonomous are you when developing? ''If you answer both subquestions with "Yes, definitely", we are a tad confused. ;-)''<br />
I prefer to search in Google before ask for help. But questions with fast answers worth the orientation time.<br />
** Do you like to discuss changes intensively and not start coding until you know what you want to do?<br />
I only start to code with a initial class diagram, but I never discussed much before start to code.<br />
** Do you like to code a proof of concept to 'see how it turns out', modifying that and taking the risk of having work thrown away if it doesn't match what the project or original proponent had in mind?<br />
Some code can definitely be write before a discuss, this code includes examples of uses of other software parts and use of library’s. In complex software's I prefer the spiral development model.<br />
<br />
== Y: Your task ==<br />
* Did you select a task from our list of proposals and ideas?<br />
I choose the Interface to Electronic Circuit Simulator.<br />
http://wiki.octave.org/Summer_of_Code_Project_Ideas#Interface_to_Electronic_Circuit_Simulator<br />
** If yes, what task did you choose? Please describe what part of it you especially want to focus on if you can already provide this information. ''Please also wiki-link the page for your elaborated proposal here.''<br />
** If you apply for a task you have added yourself instead, please describe this task, its scope and people you already talked to concerning it. What field of tasks did you miss on the list?<br />
* Please provide a rough estimated timeline for your work on the task. ''This should include the GSoC midterms and personal commitments like exams or vacation ("non-coding time"). Optionally include two or three milestones you expect.''</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=User:Ricardofantin&diff=4306
User:Ricardofantin
2014-03-05T17:39:32Z
<p>Ricardofantin: /* A: An introduction */</p>
<hr />
<div>== A: An introduction ==<br />
* Please describe yourself in three sentences, one of them regarding your current studies.<br />
I'm a computer engineering student and will finish my study in may/2014. I live in Brazil with my parents and brothers. Free Software always take my attention because the easy installation of packages allow me to install one of the best image editor/3d modelling/video editor/IDE very fast.<br />
** Which languages do you speak?<br />
I'm a native Brazilian Portuguese speaker and studied the basic of Spanish and German. Furthermore, you can judge my English by reading this page.<br />
** What's your overall background? ''The general field you work in or are studying, e.g. computer science, physics, artificial intelligence, control theory...''<br />
I like computer programming and math in second place. I did some research in Geometric Algebra over two years in the past, there is a Matlab package with a geometric algebra tutorial that doesn't work in octave because of some input functions. I want finish my graduate course and start an Master of Science course and work with octave is a great way to improve my curriculum. My main experience is in Image Processing, but I have interest in other areas like control or numerical computation.<br />
* Why do you want to participate in the Google Summer of Code? What do you hope to gain by doing so?<br />
Google Summer of Code is a great place to start collaborate with big and complex free software. The preparation time to code for a first time in a big project only is justifiable if there is much improvements wanted by the programmer in that software. Octave take my attention because Matlab is the proprietary software that my professors more incentive to use even without the property licence, Octave should replace Matlab in every application even the graphical ones. Learn to code big softwares and work in a community is my main interest, fame cold be a second objective, the money is also a good incentive.<br />
** Please also describe your previous experience with the GSoC, if any. ''Includes any community-bonding, mentor experience or application, not necessarily accepted. We use this subquestion to identify which students are unfamiliar with how the program goes, providing further support. It has no negative impact on your rating!''<br />
I tried to contribute to mono project around seven years ago, in that moment I wanted to code something, but I was mentored to write documentation. I learned allot about the mono and translated much material to Brazilian Portuguese, but I didn't learned to code, which was my objective.<br />
* Why are you choosing Octave?<br />
Octave is a project that involves programming and mathematics which are my main study subjects. I read many projects ideas, and Octave's where the ones that would help me more in curriculum and free software evangelism.<br />
<br />
== C: Contact ==<br />
* Please state the (unique and identical where possible) nick you use on IRC and any other communication channel related to Octave. ''We really want unique nicks. You might want to bold it.''<br />
My nickname in FreeNode, e-mail list and octave wiki is ricardofantin.<br />
* Which time zone do you live in? Will that change over GSoC duration? ''Perhaps DST adjustment or a relocation. Note that both UTC and GMT are not aware of daylight saving time! Please state UTC+x or -x.''<br />
I live in UTC-3<br />
<br />
* Please state the timeframe (in UTC+0) when you feel most comfortable working during GSoC. Where are your time buffers? ''Example: I usually code around 9.00 to 18.00 and could also try to start earlier (~7.00) for few days ;-)''<br />
I prefer to work from 12.00 until 22.00 .<br />
<br />
== E: Coding experience ==<br />
* Please describe your experience with C++, Octave or Matlab m-scripts, OpenGL and Qt.<br />
I have plenty experience in object oriented software programming, mainly in Java. I had many classes that teach/uses C++ and Matlab. I participate in many programming competitions using C++. In my final coursework I'm using C++, Qt and OpenCV.<br />
* Please describe your experience with other programming languages.<br />
I learned Visual Basic alone many years ago. HTML, javascript and css are also in my portfolio. In my University courses I used C, PHP, Java and many others. For large projects, involving threads, sockets and GUI I used java. In one web site application I used PHP and used C in embed devices and Data Structures.<br />
* Please describe your experience with being in a development team. ''Do you have experience working with open source or free projects?''<br />
In university the major projects intended to be done in groups. I participated in translation of some packages in Ubuntu and helped in the Portuguese forum. Existed a project called Mono Brasil which had a visual basic.net compiler and many documentation in Portuguese, I helped in translation, answered some questions in forum and in e-mail list. I tried to make a wrapper for autodia read argouml files, but it didn't work because argouml xml files weren't read by sympleXML (a Perl library).<br />
* Please describe the biggest project you have written code for and what you learned by doing so. Also describe your role in that project over time.<br />
There was one that consist of a omnidirectional robot project that have planning, checkpoints and much work distributed in five members. In this project the time used in communication was enormous. I worked in the GUI and in the wire-less communication between the computer and the robot. The project helped-me gain experience in big projects and in group work<br />
* Please state the commits and patches you already contributed to Octave. ''This question (one of the most important parts by the way) is the only part of your application our wiki admins will edit for you even after the application deadline. Code sometimes speaks louder than many words do.''<br />
<br />
<br />
== F: Feeling fine ==<br />
* Please describe (in short) your experience with the following tools: ''We only use this question to determine where you need guidance, not for rating! We by no means expect you to be familiar with all of these and you'll won't necessarily need them while working with us.''<br />
I have experience in IRC and Mailing lists. I work a little with SVN. Already worked with MediaWiki. My preferred editor is vim with make and sometimes gdb. Already used many IDE including QTCreator.<br />
Octave is one of Free Software Foundation high priority projects and it's important to my too. I would continue coding to the project if my communication with the community go fine.<br />
** IRC and mailing lists<br />
** Mercurial or other source code management systems<br />
** Mediawiki or other wiki software<br />
** make, gcc, gdb or other development tools<br />
* What will make you actively stay in our community after this GSoC is over? ''You can also tell us after applications close and we'll happily try to fulfill :-)''<br />
<br />
<br />
== O: Only out of interest ==<br />
* Did you ever hear about Octave before? <br />
** If so, when and where? How far have you been involved already?<br />
** If not, where would you expect or advise us to do advertising?<br />
I don't remember the first time I listen about Octave, I used Octave in all homework that I were supposed to use Matlab. I think professors should use Octave, but the major of them prefer Matlab. I can’t think a place to advise free and easy that would increases it uses.<br />
* What was the first question concerning Octave you could not find an answer to rather quickly? ''Of course more than one question can be stated. We try to improve based on this each year! Includes learning how to use it, code, website, GSoC application, …''<br />
In Matlab communication toolbox is possible to simulate some data communication using blocks, I don't know if it's possible with Octave even using only the command line.<br />
I tried some time ago, create a matrix of Objects, but it only allowed me to create a matrix of double. Then I used containers, but it was very slow.<br />
<br />
== P: Prerequisites ==<br />
* Please state the operating system you work with.<br />
** If you have access to more than one, please state them and the conditions under which you are granted this access.<br />
* Please estimate an average time per day you will be able to ''(if separated)'' access<br />
** an internet connection<br />
** a computer<br />
** a computer with your progressing work on<br />
* Please describe the degree up to which you can install new software on computers you have access to.<br />
I use Ubuntu 13:10 in my personal computer. I have also a Windows 7 in my personal computer. In my notebook I have Ubuntu 12:04. In all of these I have full access to install software.<br />
During the program I want to stay at home, and in home I always have access to a computer with internet.<br />
<br />
== S: Self-assessment ==<br />
* Please describe how useful criticism looks from your point of view as committing student.<br />
Criticism means that some one spend his time looking my work, so he have the right to criticism. But I don't like suggestions about the whole thing, tips in specific point's are more welcome.<br />
* How autonomous are you when developing? ''If you answer both subquestions with "Yes, definitely", we are a tad confused. ;-)''<br />
I prefer to search in Google before ask for help. But questions with fast answers worth the orientation time.<br />
** Do you like to discuss changes intensively and not start coding until you know what you want to do?<br />
I only start to code with a initial class diagram, but I never discussed much before start to code.<br />
** Do you like to code a proof of concept to 'see how it turns out', modifying that and taking the risk of having work thrown away if it doesn't match what the project or original proponent had in mind?<br />
Some code can definitely be write before a discuss, this code includes examples of uses of other software parts and use of library’s. In complex software's I prefer the spiral development model.<br />
<br />
== Y: Your task ==<br />
* Did you select a task from our list of proposals and ideas?<br />
I choose the Interface to Electronic Circuit Simulator.<br />
http://wiki.octave.org/Summer_of_Code_Project_Ideas#Interface_to_Electronic_Circuit_Simulator<br />
** If yes, what task did you choose? Please describe what part of it you especially want to focus on if you can already provide this information. ''Please also wiki-link the page for your elaborated proposal here.''<br />
** If you apply for a task you have added yourself instead, please describe this task, its scope and people you already talked to concerning it. What field of tasks did you miss on the list?<br />
* Please provide a rough estimated timeline for your work on the task. ''This should include the GSoC midterms and personal commitments like exams or vacation ("non-coding time"). Optionally include two or three milestones you expect.''</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=User:Ricardofantin&diff=4273
User:Ricardofantin
2014-03-04T23:29:07Z
<p>Ricardofantin: </p>
<hr />
<div>== A: An introduction ==<br />
* Please describe yourself in three sentences, one of them regarding your current studies.<br />
I'm a computer engineering student and will finish my study in may/2014. I live in Brazil with my parents and brothers. Free Software always take my attention because the easy installation of packages allowing me to install one of the best image editor/3d modelling/video editor/IDE very fast.<br />
** Which languages do you speak?<br />
I'm a native Brazilian Portuguese speaker and studied the basic of Spanish and German. Furthermore, you can judge my English by reading this page.<br />
** What's your overall background? ''The general field you work in or are studying, e.g. computer science, physics, artificial intelligence, control theory...''<br />
I like computer programming and math in second place. I did some research in Geometric Algebra over two years in the past, there is a Matlab package with a geometric algebra tutorial that doesn't work in octave because of some input functions. I want finish my graduate course and start an Master of Science course and work with octave is a great way to improve my curriculum. My main experience is in Image Processing, but I have interest in other areas like control or numerical computation.<br />
* Why do you want to participate in the Google Summer of Code? What do you hope to gain by doing so?<br />
Google Summer of Code is a great place to start collaborate with big and complex free software. The preparation time to code for a first time in a big project only is justifiable if there is much improvements wanted by the programmer in that software. Octave take my attention because Matlab is the proprietary software that my professors more incentive to use even without the property licence, Octave should replace Matlab in every application even the graphical ones. Learn to code big softwares and work in a community is my main interest, fame cold be a second objective, the money is also a good incentive.<br />
** Please also describe your previous experience with the GSoC, if any. ''Includes any community-bonding, mentor experience or application, not necessarily accepted. We use this subquestion to identify which students are unfamiliar with how the program goes, providing further support. It has no negative impact on your rating!''<br />
I tried to contribute to mono project around seven years ago, in that moment I wanted to code something, but I was mentored to write documentation. I learned allot about the mono and translated much material to Brazilian Portuguese, but I didn't learned to code, which was my objective.<br />
* Why are you choosing Octave?<br />
Octave is a project that involves programming and mathematics which are my main study subjects. I read many projects ideas, and Octave's where the ones that would help me more in curriculum and free software evangelism.<br />
<br />
<br />
== C: Contact ==<br />
* Please state the (unique and identical where possible) nick you use on IRC and any other communication channel related to Octave. ''We really want unique nicks. You might want to bold it.''<br />
My nickname in FreeNode, e-mail list and octave wiki is ricardofantin.<br />
* Which time zone do you live in? Will that change over GSoC duration? ''Perhaps DST adjustment or a relocation. Note that both UTC and GMT are not aware of daylight saving time! Please state UTC+x or -x.''<br />
I live in UTC-3<br />
<br />
* Please state the timeframe (in UTC+0) when you feel most comfortable working during GSoC. Where are your time buffers? ''Example: I usually code around 9.00 to 18.00 and could also try to start earlier (~7.00) for few days ;-)''<br />
I prefer to work from 12.00 until 22.00 .<br />
<br />
== E: Coding experience ==<br />
* Please describe your experience with C++, Octave or Matlab m-scripts, OpenGL and Qt.<br />
I have plenty experience in object oriented software programming, mainly in Java. I had many classes that teach/uses C++ and Matlab. I participate in many programming competitions using C++. In my final coursework I'm using C++, Qt and OpenCV.<br />
* Please describe your experience with other programming languages.<br />
I learned Visual Basic alone many years ago. HTML, javascript and css are also in my portfolio. In my University courses I used C, PHP, Java and many others. For large projects, involving threads, sockets and GUI I used java. In one web site application I used PHP and used C in embed devices and Data Structures.<br />
* Please describe your experience with being in a development team. ''Do you have experience working with open source or free projects?''<br />
In university the major projects intended to be done in groups. I participated in translation of some packages in Ubuntu and helped in the Portuguese forum. Existed a project called Mono Brasil which had a visual basic.net compiler and many documentation in Portuguese, I helped in translation, answered some questions in forum and in e-mail list. I tried to make a wrapper for autodia read argouml files, but it didn't work because argouml xml files weren't read by sympleXML (a Perl library).<br />
* Please describe the biggest project you have written code for and what you learned by doing so. Also describe your role in that project over time.<br />
There was one that consist of a omnidirectional robot project that have planning, checkpoints and much work distributed in five members. In this project the time used in communication was enormous. I worked in the GUI and in the wire-less communication between the computer and the robot. The project helped-me gain experience in big projects and in group work<br />
* Please state the commits and patches you already contributed to Octave. ''This question (one of the most important parts by the way) is the only part of your application our wiki admins will edit for you even after the application deadline. Code sometimes speaks louder than many words do.''<br />
<br />
<br />
== F: Feeling fine ==<br />
* Please describe (in short) your experience with the following tools: ''We only use this question to determine where you need guidance, not for rating! We by no means expect you to be familiar with all of these and you'll won't necessarily need them while working with us.''<br />
I have experience in IRC and Mailing lists. I work a little with SVN. Already worked with MediaWiki. My preferred editor is vim with make and sometimes gdb. Already used many IDE including QTCreator.<br />
Octave is one of Free Software Foundation high priority projects and it's important to my too. I would continue coding to the project if my communication with the community go fine.<br />
** IRC and mailing lists<br />
** Mercurial or other source code management systems<br />
** Mediawiki or other wiki software<br />
** make, gcc, gdb or other development tools<br />
* What will make you actively stay in our community after this GSoC is over? ''You can also tell us after applications close and we'll happily try to fulfill :-)''<br />
<br />
<br />
== O: Only out of interest ==<br />
* Did you ever hear about Octave before? <br />
** If so, when and where? How far have you been involved already?<br />
** If not, where would you expect or advise us to do advertising?<br />
I don't remember the first time I listen about Octave, I used Octave in all homework that I were supposed to use Matlab. I think professors should use Octave, but the major of them prefer Matlab. I can’t think a place to advise free and easy that would increases it uses.<br />
* What was the first question concerning Octave you could not find an answer to rather quickly? ''Of course more than one question can be stated. We try to improve based on this each year! Includes learning how to use it, code, website, GSoC application, …''<br />
In Matlab communication toolbox is possible to simulate some data communication using blocks, I don't know if it's possible with Octave even using only the command line.<br />
I tried some time ago, create a matrix of Objects, but it only allowed me to create a matrix of double. Then I used containers, but it was very slow.<br />
<br />
== P: Prerequisites ==<br />
* Please state the operating system you work with.<br />
** If you have access to more than one, please state them and the conditions under which you are granted this access.<br />
* Please estimate an average time per day you will be able to ''(if separated)'' access<br />
** an internet connection<br />
** a computer<br />
** a computer with your progressing work on<br />
* Please describe the degree up to which you can install new software on computers you have access to.<br />
I use Ubuntu 13:10 in my personal computer. I have also a Windows 7 in my personal computer. In my notebook I have Ubuntu 12:04. In all of these I have full access to install software.<br />
During the program I want to stay at home, and in home I always have access to a computer with internet.<br />
<br />
== S: Self-assessment ==<br />
* Please describe how useful criticism looks from your point of view as committing student.<br />
Criticism means that some one spend his time looking my work, so he have the right to criticism. But I don't like suggestions about the whole thing, tips in specific point's are more welcome.<br />
* How autonomous are you when developing? ''If you answer both subquestions with "Yes, definitely", we are a tad confused. ;-)''<br />
I prefer to search in Google before ask for help. But questions with fast answers worth the orientation time.<br />
** Do you like to discuss changes intensively and not start coding until you know what you want to do?<br />
I only start to code with a initial class diagram, but I never discussed much before start to code.<br />
** Do you like to code a proof of concept to 'see how it turns out', modifying that and taking the risk of having work thrown away if it doesn't match what the project or original proponent had in mind?<br />
Some code can definitely be write before a discuss, this code includes examples of uses of other software parts and use of library’s. In complex software's I prefer the spiral development model.<br />
<br />
== Y: Your task ==<br />
* Did you select a task from our list of proposals and ideas?<br />
I choose the Interface to Electronic Circuit Simulator.<br />
http://wiki.octave.org/Summer_of_Code_Project_Ideas#Interface_to_Electronic_Circuit_Simulator<br />
** If yes, what task did you choose? Please describe what part of it you especially want to focus on if you can already provide this information. ''Please also wiki-link the page for your elaborated proposal here.''<br />
** If you apply for a task you have added yourself instead, please describe this task, its scope and people you already talked to concerning it. What field of tasks did you miss on the list?<br />
* Please provide a rough estimated timeline for your work on the task. ''This should include the GSoC midterms and personal commitments like exams or vacation ("non-coding time"). Optionally include two or three milestones you expect.''</div>
Ricardofantin
https://wiki.octave.org/wiki/index.php?title=User:Ricardofantin&diff=4250
User:Ricardofantin
2014-03-03T22:36:04Z
<p>Ricardofantin: </p>
<hr />
<div>== A: An introduction ==<br />
* Please describe yourself in three sentences, one of them regarding your current studies.<br />
I'm a computer engineering student and will finish my study in may/2014. I live in Brazil with my parents and brothers. Free Software always take my attention because the easy installation of packages allowing me to install one of the best image editor/3d modelling/video editor/IDE very fast.<br />
** Which languages do you speak?<br />
I'm a native Brazilian Portuguese speaker and studied the basic of Spanish and German. Furthermore, you can judge my English by reading this page.<br />
** What's your overall background? ''The general field you work in or are studying, e.g. computer science, physics, artificial intelligence, control theory...''<br />
I like computer programming and math in second place. I did some research in Geometric Algebra over two years in the past, there is a Matlab package with a geometric algebra tutorial that doesn't work in octave because of some input functions. I want finish my graduate course and start an Master of Science course and work with octave is a great way to improve my curriculum. My main experience is in Image Processing, but I have interest in other areas like control or numerical computation.<br />
* Why do you want to participate in the Google Summer of Code? What do you hope to gain by doing so?<br />
Google Summer of Code is a great place to start collaborate with big and complex free software. The preparation time to code for a first time in a big project only is justifiable if there is much improvements wanted by the programmer in that software. Octave take my attention because Matlab is the proprietary software that my professors more incentive to use even without the property licence, Octave should replace Matlab in every application even the graphical ones. Learn to code big softwares and work in a community is my main interest, fame cold be a second objective, the money is also a good incentive.<br />
** Please also describe your previous experience with the GSoC, if any. ''Includes any community-bonding, mentor experience or application, not necessarily accepted. We use this subquestion to identify which students are unfamiliar with how the program goes, providing further support. It has no negative impact on your rating!''<br />
I tried to contribute to mono project around seven years ago, in that moment I wanted to code something, but I was mentored to write documentation. I learned allot about the mono and translated much material to Brazilian Portuguese, but I didn't learned to code, which was my objective.<br />
* Why are you choosing Octave?<br />
Octave is a project that involves programming and mathematics which are my main study subjects. I read many projects ideas, and Octave's where the ones that would help me more in curriculum and free software evangelism.<br />
<br />
<br />
== C: Contact ==<br />
* Please state the (unique and identical where possible) nick you use on IRC and any other communication channel related to Octave. ''We really want unique nicks. You might want to bold it.''<br />
My nickname in FreeNode, e-mail list and octave wiki is ricardofantin.<br />
* Which time zone do you live in? Will that change over GSoC duration? ''Perhaps DST adjustment or a relocation. Note that both UTC and GMT are not aware of daylight saving time! Please state UTC+x or -x.''<br />
I live in UTC-3<br />
<br />
* Please state the timeframe (in UTC+0) when you feel most comfortable working during GSoC. Where are your time buffers? ''Example: I usually code around 9.00 to 18.00 and could also try to start earlier (~7.00) for few days ;-)''<br />
I prefer to work from 12.00 until 22.00 .<br />
<br />
== E: Coding experience ==<br />
* Please describe your experience with C++, Octave or Matlab m-scripts, OpenGL and Qt.<br />
I have plenty experience in object oriented software programming, mainly in Java. I had many classes that teach/uses C++ and Matlab. I participate in many programming competitions using C++. In my final coursework I'm using C++, Qt and OpenCV.<br />
* Please describe your experience with other programming languages.<br />
I learned Visual Basic alone many years ago. HTML, javascript and css are also in my portfolio. In my University courses I used C, PHP, Java and many others. For large projects, involving threads, sockets and GUI I used java. In one web site application I used PHP and used C in embed devices and Data Structures.<br />
* Please describe your experience with being in a development team. ''Do you have experience working with open source or free projects?''<br />
In university the major projects intended to be done in groups. I participated in translation of some packages in Ubuntu and helped in the Portuguese forum. Existed a project called Mono Brasil which had a visual basic.net compiler and many documentation in Portuguese, I helped in translation, answered some questions in forum and in e-mail list. I tried to make a wrapper for autodia read argouml files, but it didn't work because argouml xml files weren't read by sympleXML (a Perl library).<br />
* Please describe the biggest project you have written code for and what you learned by doing so. Also describe your role in that project over time.<br />
There was one that consist of a omnidirectional robot project that have planning, checkpoints and much work distributed in five members. In this project the time used in communication was enormous. I worked in the GUI and in the wire-less communication between the computer and the robot. The project helped-me gain experience in big projects and in group work<br />
* Please state the commits and patches you already contributed to Octave. ''This question (one of the most important parts by the way) is the only part of your application our wiki admins will edit for you even after the application deadline. Code sometimes speaks louder than many words do.''<br />
<br />
<br />
== F: Feeling fine ==<br />
* Please describe (in short) your experience with the following tools: ''We only use this question to determine where you need guidance, not for rating! We by no means expect you to be familiar with all of these and you'll won't necessarily need them while working with us.''<br />
I have experience in IRC and Mailing lists. I work a little with SVN. Already worked with MediaWiki. My preferred editor is vim with make and sometimes gdb. Already used many IDE including QTCreator.<br />
Octave is one of Free Software Foundation high priority projects and it's important to my too. I would continue coding to the project if my communication with the community go fine.<br />
** IRC and mailing lists<br />
** Mercurial or other source code management systems<br />
** Mediawiki or other wiki software<br />
** make, gcc, gdb or other development tools<br />
* What will make you actively stay in our community after this GSoC is over? ''You can also tell us after applications close and we'll happily try to fulfill :-)''<br />
<br />
<br />
== O: Only out of interest ==<br />
* Did you ever hear about Octave before? <br />
** If so, when and where? How far have you been involved already?<br />
** If not, where would you expect or advise us to do advertising?<br />
* What was the first question concerning Octave you could not find an answer to rather quickly? ''Of course more than one question can be stated. We try to improve based on this each year! Includes learning how to use it, code, website, GSoC application, …''<br />
<br />
<br />
== P: Prerequisites ==<br />
* Please state the operating system you work with.<br />
** If you have access to more than one, please state them and the conditions under which you are granted this access.<br />
* Please estimate an average time per day you will be able to ''(if separated)'' access<br />
** an internet connection<br />
** a computer<br />
** a computer with your progressing work on<br />
* Please describe the degree up to which you can install new software on computers you have access to.<br />
<br />
<br />
== S: Self-assessment ==<br />
* Please describe how useful criticism looks from your point of view as committing student.<br />
* How autonomous are you when developing? ''If you answer both subquestions with "Yes, definitely", we are a tad confused. ;-)''<br />
** Do you like to discuss changes intensively and not start coding until you know what you want to do?<br />
** Do you like to code a proof of concept to 'see how it turns out', modifying that and taking the risk of having work thrown away if it doesn't match what the project or original proponent had in mind?<br />
<br />
<br />
== Y: Your task ==<br />
* Did you select a task from our list of proposals and ideas?<br />
** If yes, what task did you choose? Please describe what part of it you especially want to focus on if you can already provide this information. ''Please also wiki-link the page for your elaborated proposal here.''<br />
** If you apply for a task you have added yourself instead, please describe this task, its scope and people you already talked to concerning it. What field of tasks did you miss on the list?<br />
* Please provide a rough estimated timeline for your work on the task. ''This should include the GSoC midterms and personal commitments like exams or vacation ("non-coding time"). Optionally include two or three milestones you expect.''</div>
Ricardofantin