I = imread('baboon.jpg')
Inimage = imguidedfilter(I)
imshow(Inimage)
Error: Undefined Function imguidedfilter
But when I search there appears to be a function by this name. Why?
MATLAB is regularly updated with new functions, and there are also multiple toolboxes (with their own updates). So the functions you can use depends on your version of MATLAB. Unfortunately it is not easy to find out in which version of MATLAB a function first became available.
You can use these functions to get some more information:
ver - to see what MATLAB version you have and which which toolboxes you have access to.
which - to see if a particular function is on your MATLAB path
e.g. which imguidedfilter will show you if you have access to the function imguidedfilter.
This particular function appears to be a very new function which you may need R2014a for (as I have R2013b and Image Processing Toolbox and don't have it).
Related
I am using Matlab R2010a but could not find 'webread' function but with the message : "Undefined function or variable 'webread'." is shown.
The only available web function is 'web'.
How to download that function or solve the problem anyway?
As you can see at the bottom of the documentation for webread function, it has been introduced only in matlab 2014b.
You might find this (aka this), or this helpful as a substitute. I do not know whether any of them will work well on such an old version of Matlab though.
I want to run MATLAB 2015b algorithm on Android device through NDK. So I need a standalone c code from algorithm. I used Matlab Coder for this, But I get this error:
The function 'bwboundaries' is not supported for standalone code generation. See the documentation for coder.extrinsic to learn how you can use this function in simulation.`
I used this function in this way:
[B,L]=bwboundaries(h1);
the h1 is an 280*500 logical array which comes from a Black & White image.
I searched and found this list: Functions and Objects Supported for C and C++ Code Generation
As we see there the bwboundaries declared in the list:
bwboundaries :
The conn and options arguments must be compile-time constants and the return value A can only be a full matrix, not a sparse matrix.
If you choose the generic MATLAB Host Computer target platform, generated code uses a precompiled, platform-specific shared library.
MATLAB Function Block support: No.
I don't understand it!! How should I use this function to have its c code?
OR Is there any function to use instead?
I see this SO questions which didn't help me:
q1 q2 q3
I tried using the .. command in MATLAB to generate Laguerre polynomials but I keep getting this error every time:
I found this in the help section:
Since I have defined x as symbolic I shouldn't be getting this error.
Also on website I found this which says that the function does not run in MATLAB.
Can anyone help? Thanks in advance
Like you say, and the matlab help says this function only works inside mupad, maybe in later versions it works in matlab console.
If you want to use it, write mupad in Matlab Command window and then use it in the mupad, matlab will return you the result as I show in the picture
In R2014b+, there is a laguerreL function available directly from within Matlab. However, a version of this function was introduced to MuPAD in R2009a. You can call the MuPAD version from within Matlab
syms x;
feval(symengine,'laguerreL',2,x)
or
evalin(symengine,'laguerreL(2,x)')
Both return x^2/2 - 2*x + 1.
You can read more about interacting with MuPAD functionality from Matlab here. However, I'd recommend browsing and searching the archived documentation for your specific version or using your built-in HTML documentation (e.g., doc mupad or doc 'calling mupad').
I have an m file from which I use to create dll using the Matlab deploytool. the code simply reads as:
function hello
disp('Hello')
end
there are six functions in the compiled dll exported as:
uint8 helloInitialize
[uint8, voidPtr, voidPtr] helloInitializeWithHandlers(voidPtr, voidPtr)
helloPrintStackTrace
helloTerminate
uint8 mlfHello
[uint8, MATLAB arrayPtr, MATLAB arrayPtr] mlxHello(int32, MATLAB arrayPtr, int32, MATLAB arrayPtr)
Now I want to run this dll from my matlab command window using calllib and use
the hello function. Assuming that I use the correct function mlfHello, calllib('hello','mlfHello') gives me nothing. Please advise me on what function to call and how to do it?
I'm not 100% its still the case but it certainly used to be that you couldn't load DLL's which were created in Matlab back into Matlab.
I suspect its still the case - so you cant do what your trying to do.
[edit] I dont have a link because they dont like to advertise the fact. The reason AFAIK is to avoid users compiling toolbox capability into DLL and giving to others to use in Matlab without a toolbox license.
I want to know how can this function(from MATLAB) resize the columns of an input image using weights an indices previously computed.
Which equations uses to do that?
resizeColumnsCore(double(in), weights', indices');
When I looked for a function called resizeColumnsCore in MATLAB 7.11.0 (R2010b) I didn't find anything. However, I did find a MEX-file by that name in MATLAB 7.8.0 (R2009a) in this subdirectory of the Image Processing Toolbox:
C:\Program Files\MATLAB\R2009a\toolbox\images\images\private\
I guess they've phased it out or replaced it with another function in newer MATLAB versions. Now, if you want to know what the MEX-file does, you need to look at the source code it is compiled from. Luckily, it appears that this source code resizeColumnsCore.cpp can be found in the following directory:
C:\Program Files\MATLAB\R2009a\toolbox\images\images\private\src\misc\
And you can look through that code to determine the algorithms used to resize the columns of an image given a set of weights and indices.
Now, if you want to know how these input arguments to resizeColumnsCore are computed, you'll have to look at the code of a function that calls it. I know of at least one function in the IPT that calls this function: IMRESIZE. If you type edit imresize at the command prompt it will open that function in the Editor, allowing you to look through the code so you can see how the arguments to resizeColumnsCore are created.
What I can tell you for R2009a is that there is a subfunction in the file imresize.m called contributions which computes the weights and indices that are ultimately passed as arguments to resizeColumnsCore. That is where you will want to start looking to determine what algorithms are used to compute these arguments.
Looks like this isn't a proprietary MATLAB function. Could we see some code or a link to the code?