Rank: 485 based on 207 downloads (last 30 days) and 10 files submitted
photo

Frederico D'Almeida

E-mail
Company/University
UnB - Universidade de Brasilia

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Frederico View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
26 Mar 2004 Nonlinear Diffusion Toolbox Set of functions to perform nonlinear diffusion on images. Author: Frederico D'Almeida filtering, nonlinear diffusion, anisotropic diffusion, coherenceenhancing di..., toolbox 60 39
  • 4.63636
4.6 | 33 ratings
18 Mar 2003 DTMF Detector Detects DTMF tones in audio by Goertzel algorithm. Author: Frederico D'Almeida dtmf, communications, goertzel, audio, algorithm 15 3
21 Feb 2002 General Extra Toolbox Generic functions for matrix manipulation, image processing, etc. Author: Frederico D'Almeida matrices, matrix, fft, image manipulation, index, max 20 4
  • 2.5
2.5 | 4 ratings
18 Feb 2002 Shrink Eliminates image borders. Author: Frederico D'Almeida morphology, segmentation, shrink border image 5 0
18 Feb 2002 Posterize Reduces the number of colors of an image. Author: Frederico D'Almeida color, posterize reduce colo... 16 0
Comments and Ratings on Frederico's Files View all
Updated File Comment by Comments Rating
02 Aug 2014 DTMF Detector Detects DTMF tones in audio by Goertzel algorithm. Author: Frederico D'Almeida Roberson, Walter

Code will break in the case that all detected digits are the same, or all the same followed by pause. To fix that, replace "ct = 1" and the following "for" loop with code such as

y = r;
for i = length(r) : -1 : 2
if y(i) == y(i-1); y(i) = []; end
end
if y(end) == '-'; y(end) = []; end
if y(1) == '-'; y(1) = []; end

This might not be the most efficient version but sometimes it is not worth writing and debugging for maximum efficiency when more clarity will do the job.

18 May 2014 Nonlinear Diffusion Toolbox Set of functions to perform nonlinear diffusion on images. Author: Frederico D'Almeida Avital, Royi

What about implementing the following method:

https://github.com/JarnoRalli/PDE-based-image-processing/issues/1

31 Oct 2012 Fast 2D Max/Min Filter Fast 2D Max/Min filter for images using the van Herk algorithm. Author: Frederico D'Almeida Zaman, Tim

20 Sep 2012 Nonlinear Diffusion Toolbox Set of functions to perform nonlinear diffusion on images. Author: Frederico D'Almeida Cai

Hi Frederico,

I am trying "nldif" function, and find that there are two options for diffusion: one is "AOS" by aosiso.m and the other is "iso" by isodifstep.
For "AOS", the result is good when I choose stepSize = 2; But for "iso", I cannot get good result for any stepSize (from 0.01 to 1...).
I want to know what value of stepSize for "iso" case can get the same result as "aos". I suppose "aos" and "iso" should get the same result when choose proper stepSize. The only different should be the speed. Is it correct?
And when I try to feed back from "aos" result to "iso" stepSize ( (aosiso(y, g, 2) - y)/dy ), but I can not get a uniform stepSize value.

Can you help me to explain above case?

code for feedback:
========
% Calculate dy/dt
%if aos
% if plotflux
% yo = y;
% end
% y = aosiso(y,g,stepsize(i)); % updating
%else
% dy = isodifstep(y, g);
% y = y + stepsize(i) * dy; % updating
%end
tmp = y;
tmp1 = aosiso(y, g, 2) - tmp;
dy = isodifstep(y, g);
ios_step = tmp1 / dy;
=======

Thanks

17 Sep 2012 Fast Tridiagonal System Solver A fast tridiagonal system solver. Author: Frederico D'Almeida D'Errico, John

It looks like those who think this is an efficient tool (Hongjun, etc.) and therefore give it a good rating, don't understand how to use sparse matrices in MATLAB. In fact, a couple of those people talk about using inv. SIGH.

In fact, this tool REALLY is considerably slower than backslash, as long as you understand what you are doing. If you have no idea what you are doing, then quite likely you are using the wrong tools in MATLAB in any event.

n = 1000000;

B = rand(n,3);
B(:,2) = B(:,2) + 1;
A = spdiags(B,-1:1,n,n);

d = rand(n,1);

a = B(:,2);
b = B(2:n,3);
c = B(1:n-1,1);

tic
xt = thomas(a,b,c,d);
toc
Elapsed time is 1.727341 seconds.

tic
xs = A\d;
toc
Elapsed time is 0.125294 seconds.

See that thomas was roughly 14 times slower than backslash on the same problem. This is a major difference. backslash was more efficient for ANY size matrix, ranging from 5 to 20 times as fast in my tests on different size matrices.

Someone will be sure to think that I've not included the time to generate the sparse matrix itself, but the call to spdiags itself took only about 0.5 seconds. So even if I combine the two calls, it still is twice as fast to use backslash. If you will do other things with the sparse matrix A, then the call to spdiags is arguably spread across all the work you do, so it is more efficient yet.

The point is, there really is no need for thomas to exist at all, as far batter tools are available in MATLAB. Use backslash. And for gods sake, do NOT use inv.

Contact us