The Image Processing Toolbox is a collection of functions that extend the capability of the MATLAB ® numeric computing environment. The toolbox supports a wide range of image processing. Signal Processing Toolbox™ provides functions and apps to analyze, preprocess, and extract features from uniformly and nonuniformly sampled signals. The toolbox includes tools for filter design and analysis, resampling, smoothing, detrending, and power spectrum estimation.
Active1 year ago
Do the MATLAB functions imread and imwrite belong to the image processing toolkit? The names seem to suggest that they do, but I'm not sure. Can anyone give some info?
gnovice120k1313 gold badges238238 silver badges342342 bronze badges
ShadiShadi36522 gold badges1212 silver badges3030 bronze badges
1 Answer
No,
imread
and imwrite
are part of the core MATLAB toolbox.Reading from or writing to image files is a basic IO process, and one that many people will likely have need to do without any need for processing the images. For example, if you just want to display an image in a figure, you shouldn't need a whole new high-powered image processing toolbox just to do that. That's why there are simple functions like
image
and imagesc
present in the core MATLAB toolbox, while the Image Processing Toolbox has an additional imshow
function that has a few more bells and whistles.In general, you'll find that a lot of basic/common operations are present in the core MATLAB toolbox, while the more advanced operations require a specialized toolbox. The names of the functions themselves won't really tell you which toolbox they belong to, but you can use the
gnovicegnovicewhich
function if you are ever in doubt about where a function lives. For example, for MATLAB R2009a:120k1313 gold badges238238 silver badges342342 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Not the answer you're looking for? Browse other questions tagged matlabimage-processing or ask your own question.
Active1 month ago
I'm trying to compile C shared library from Matlab. My Matlab code uses a lot of the image processing functionality. So, compiling goes fine, but when I call the dll from my application, I get messages like:
'Undefined function or method 'XYZ' for input arguments of type double'.
I have verified my arguments are ok -- it's not a type problem. So, I tried adding
%#function XYZ
to my .m file, but that didn't help anything. Then, I tried using the -a
flag in my compile command: ![Matlab image processing toolbox tutorial Matlab image processing toolbox tutorial](/uploads/1/2/5/7/125739556/755206649.jpg)
but it fails to compile with:
Depfun error: 'Unable to locate edge as a function on the MATLAB path'
I have verified the image processing files are on my computer (I can run everything from matlab with no problem) and my path points to the directory that contains them.
I've also tried copying the toolbox .m files into my working directory, but that quickly balloons into a lot of files. And, for some functions, there is no .m - just a .mex - and i haven't found a way to include a mex file into my .dll.
What am I missing?
mikemike
1 Answer
Have you tried including the Image Processing Toolbox folder using the
-a
option? For example:According to the
mcc
documentation, all files in this folder, as well as all files in any subfolders, are added to the CTF archive, and the folder subtree is preserved in the CTF archive.If you don't want to include every subfolder, you can load only the files in a folder using a wildcard pattern:
This may be necessary if there is a subfolder that may have functions or scripts that could shadow ones in the parent folder. For example, there is an
edge.m
function in the parent folder C:Program FilesMATLABR2009atoolboximagesimages
, and there is a ja
subfolder that contains Japanese language help files (on Windows), one of which is also called edge.m
. You wouldn't want this subfolder to be added when compiling, so you could either:- Remove that subfolder temporarily, add the parent folder without the wildcard option (to add the other subfolders you do want), then put that folder back.
- Add the parent folder with the wildcard option (to add just the files), then separately add only the subfolders you want (such as
@strel
andprivate
) with an additional-a
command. NOTE: I'm uncertain if adding subfolders separately will maintain the folder subtree of the parent directory in the CTF archive in the same way as option #1 would!
If you don't want to include a large list of files that may not end up being used, you could instead try using the function DEPFUN to first get a list of dependencies for your MATLAB code. Then from this list you can find the specific Image Processing Toolbox functions your code uses and include only those when compiling. Since you specifically asked, this newsgroup thread mentions how to include a .mex file:
NOTE: There is also a MathWorks bug report I came across (which you need a login to see) that mentions a problem compiling applications using some Image Processing Toolbox functions on Windows in R2009b. There is a workaround given at the above link. This bug is fixed as of R2010a.
120k1313 gold badges238238 silver badges342342 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.