Using image processing toolbox on other computers

I have the Image Processing toolbox on my computer. If I write a code using some function in that toolbox is there anyway someone without the toolbox can run the code? Or can I make like an executable function, for someone without the toolbox or Matlab can run?

 Accepted Answer

Yes, if you get the (very expensive) MATLAB Compiler product you can make standalone executables. See the FAQ: http://matlab.wikia.com/wiki/FAQ#MATLAB_Compiler_Toolbox Otherwise if they want to run it from MATLAB without having the toolbox installed , they will not be able to run it. Of course a standalone executable does not require MATLAB or any toolboxes but you will need to install a large "MCR" MATLAB Component Runtime library that has all the base MATLAB functions your app needs included in it, and I believe the toolbox functions are included in your app's exe.

6 Comments

What is this about compilers I found on the matlab website? The first one in the chart says it is free? All I want to do is have the user enter an image and calculate the centroids, radii and the number of circles in an image. https://www.mathworks.com/support/compilers/R2013a/index.html
This list is about C Compilers for different types of use with MATLAB and related products. The MATLAB Compiler product actually also needs a C Compiler. And while the C Compiler may or may not be free of charge, the MATLAB Compiler is a commercial product that provides a lot of value. The return on investment is actually very easy to compute and you can make your own decision about the price.
In addition to what Andreas said about the MATLAB compiler needing a separate compiler (which may or may not be free depending on which one you use), I want to point out that the MCR (MATLAB library) is free to your end users - there's no royalty fee or charge for that. So you can distribute as many of your apps, bundled with the MCR, for no additional charge beyond your one-time purchase of the compiler at the beginning. I suppose that's part of the reason why it's so much more expensive than the other toolboxes.
Problems with the other answers here:
  • The MCR does not contain the Image Processing Toolbox libraries, and therefore does not in itself enable users to run Image Processing Toolbox functionality in your exe. The MCR only contains runtime libs supporting base Matlab functionality (and a restricted set, at that).
  • If my current struggles with Matlab Coder are indicative of the situation with Matlab Compiler, it is possibly that Image Toolbox libs may not in fact be compiled-into your exe, but rather the user must have his/her own copies of the required Image Toolbox DLLs on his/her own machine. Or, if anyone can correct me on this, please do, because I need to be able to distribute a program that uses the Image Processing Toolbox, and I can't find licensing or technical guidance anywhere (Coder just copies the Image Processing DLLs to the output dir).
Keith, the MCR does indeed contain the Image Processing Toolbox libraries. Are you sure you had a license for IPT available when you did the compilation>
I don't see a problem with our answers. In fact your first point agrees with my answer where I said "MATLAB Component Runtime library that has all the base MATLAB functions your app needs included in it, and I believe the toolbox functions are included in your app's exe."
And for your second point, I compile image processing apps all the time and my users don't have or need "his/her own copies of the required Image Toolbox DLLs on his/her own machine." My users have nothing, no Mathworks products beforehand, and all they install is the MCR and my app and it works fine. They don't need anything else.
If you have problems with Coder, as opposed to the MATLAB Compiler, you'd have to ask the Mathworks. I don't have Coder.

Sign in to comment.

More Answers (2)

define what image processing toolbox in matlab

2 Comments

I have absolutely no idea what this Answer means, or how it answers the original question. If you think you have something to add that was not discussed in the other Answer, then please elaborate, because I think your Answer just leaves everyone confused.
This is Image Processing Toolbox:
Here is the documentation root for IPT:

Sign in to comment.

DGM
DGM on 26 Dec 2022
Edited: DGM on 24 Mar 2023
I see two questions, the latter of which is well-answered already. Aside from the prospect of compiling standalone executables, there may be things you can do to remove dependency of basic m-code on Image Processing Toolbox. Before we go that far, consider that a number of very common IPT tools have actually been included in the base toolbox since 2013. For example, imshow() and im2double were moved in R2014b; imresize() was moved sometime after R2015b. Also, maybe it's just my skewed perspective, but it seems to me that more users (especially students) have access to IPT than they did 10-15 years ago.
That said, there are a number of user-contributed implementations of basic tools on the File Exchange. It all depends what you're after, though one should be aware that many are themselves not independent of IPT and may need further work.
For the sake of addressing its own IPT dependency, MIMT includes a number of passthrough/fallback wrappers for basic IPT tools. It also includes a number of tools that aren't wrappers, but may suffice to replace some usage of various IPT tools. For example:
These MIMT tools include conditional fallback implementations which will run in the absence of IPT (or in versions prior to the introduction of the corresponding IPT function). These are not generally drop-in replacements for all use-cases, and the fallback code may be slower than the IPT passthrough. Check the documentation and take note of any differences in supported functionality or syntax.
  • adapthisteqFB uses/replaces adapthisteq
  • bwareafiltFB uses/replaces bwareafilt
  • bwdistFB uses/replaces bwdist
  • bwlabelFB uses/replaces bwlabel
  • despeckle uses/replaces bwareaopen (default does both opening and closing)
  • histeqFB uses/replaces histeq
  • hitmiss uses/replaces bwhitmiss
  • imadjustFB uses/replaces imadjust
  • imcast uses/replaces im2double, im2uint8, etc
  • imappmat uses/replaces imapplymatrix (default output class handling differs)
  • imcropFB uses/replaces imcrop
  • imfilterFB uses/replaces imfilter (default edge handling differs)
  • imhistFB uses/replaces imhist
  • imresizeFB uses/replaces imresize
  • imrotateFB uses/replaces imrotate
  • imhistmatchFB uses/replaces imhistmatch
  • imnoiseFB uses/replaces imnoise
  • imsharpenFB uses/replaces imsharpen
  • imshow2 uses/replaces imshow (defaults, view controls, and capabilities differ)
  • morphnhood uses/replaces bwmorph, bwperim, (bwlookup to some extent)
  • morphops uses/replaces imdilate, imopen, imtophat, etc
  • nhfilter uses/replaces medfilt2, stdfilt, rangefilt, (nlfilter to some extent)
  • padarrayFB uses/replaces padarray
  • stretchlimFB uses/replaces stretchlim
These tools don't passthrough to their IPT counterparts, but may fill the same role depending on your needs. For example:
  • edgemap see imgradient, edge
  • replacepixels see imoverlay
  • fkgen see fspecial
  • tonemap see tonemap
  • mono see rgb2gray, im2gray, rgb2lightness
  • imerror see immse, psnr
  • imcheckerboard see checkerboard
  • pickblobs see bwselect
  • splitchans see imsplit
  • iminv see imcomplement
  • imclassrange see getrangefromclass
  • colordiff see deltaE, imcolordiff
  • roifilter see roifilt2
  • flattenbg see imflatfield
  • unsharp see imsharpen
  • immodify see imcontrast
  • imcompare see imfuse, imshowpair
  • rgb2linear see rgb2lin
  • linear2rgb see lin2rgb
  • and other color space conversion tools
There are definitely limitations to this approach. MIMT tools are generally dependent on other MIMT tools, so isolating a subset of MIMT tools to include in your own release is a minor chore. More significantly, several very valuable tools like regionprops(), bwconncomp(), and image registration/transformation tools aren't covered by MIMT or other FEX submissions. While that means that user-submitted implementations can't answer OP's need, they might suffice for simpler cases.

Categories

Asked:

on 4 Oct 2013

Edited:

DGM
on 24 Mar 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!