File Comment by Comment
14 Aug 2014 ColorBrewer: Attractive and Distinctive Colormaps The complete palette of ColorBrewer colormaps. Simple selection by scheme name and map length. Michael Chan

Beautiful work, Stephen.

26 Jun 2014 Wavelet Decomposition For Images The demo decouples the wavelet operations from the plotting. Michael Chan

Hi Mehdi,
You can extract the coefficients at different levels as an obversation with any existing image(s). Would you have a wavelet feature extraction algorithm in mind or a paper you have referred to?

22 Jun 2014 Using Gauss' Algorithm to solve simultaneous linear congruences for Chinese Remainder Theorem Gauss' Algorithm to solve for Chinese Remainder Theorem (CRT) Michael Chan

Number of linear congruences to be extended in the next update.

20 Jan 2013 arrow.m Draw a line with an arrowhead. Michael Chan

How do you turn off the arrow heads at either ends of the start and stop points?

16 Jan 2013 Wavelet Decomposition For Images The demo decouples the wavelet operations from the plotting. Michael Chan

Hi Rewati, it is. It's a form of lossy compression where you keep only the coefficients of the Approximate region(s).

01 Jun 2012 Wavelet Decomposition For Images The demo decouples the wavelet operations from the plotting. Michael Chan

Hi Diógenes Diógenes,

Did you run the observeWaveletDecompositionBenchmark_N_levels.m file? As stated in the readme.txt, it is the main executing reference usage file.

For a single decomposition level, set

levelOfDecomposition = 1; % level N = 1

For the inquiries regarding the variables, in image wavelet decomposition, the segments are divided according to the (H)orizontal, (V)ertical, (A)pproximate and (D)iagonal regions.

Usually, the coefficients are represented in the form (in the example of 1 level wavelet decomposition):
coeff_A1, coeff_H1;
coeff_V1, coeff_D1;

I hope that helps.

23 Apr 2012 Embedding/ Hiding Image Within Image (with LSB encoding) The objective is to illustrate how an image may be embedded or hidden within another given image. Michael Chan

yes, BITGET and BITSET is more relevant.

23 Apr 2012 Embedding/ Hiding Image Within Image (with LSB encoding) The objective is to illustrate how an image may be embedded or hidden within another given image. Michael Chan

That is true.
The intention though is to make it easier for people to translate by handcoding it to C/ C++ or Java by reducing the use of Matlab toolboxes.

However, I agree with you. I will provide 2 versions later on.

23 Feb 2012 Bit-slicing function for integer matrices function E = bitreslice(A,b_old, b_new, echo_on) Re-packages bits of a matrix of integers. Michael Chan

Thank you.

23 Feb 2012 Brush Smaller Image Or Matrix Over A Larger Matrix, Select ROI with resizeable window Illustrates how a smaller matrix may be 'brushed' against a larger one without overflowing. Michael Chan

Hi Roy,

Here is an example:

IMG = 'lena.jpg'; % IMG : originalImage
IMG = rgb2gray(IMG);

[rowSizeOfOrgImg colSizeOfOrgImg] = size(IMG);

% position image in frame pad

imshow(IMG, []);

I hope this is clear. You may wish to email me for further inquires, as it is easier to trace the comments in my inbox. I hope it helps.
Thank you.

23 Feb 2012 Image Error Measurements Measures the differences between 2 images, and measurement of image quality. Michael Chan

Hi Shashi,
The utilities works with image of MxN (where M != N) as well.

Try insert these lines as a test starting from line 23 in usage sample code (usage_errorMeasurementsOfImages.m) :

M = 225; N = 150;
IMG = imresize(IMG, [M N], 'bicubic');

I hope this is clear. You may wish to email me for further inquires, as it is easier to trace the comments in my inbox. I hope it helps.
Thank you.

22 Oct 2011 Memory Selection Coverage Observation on partial scanning for power conservation and enhance speed performance. Michael Chan

Hi Jan,

It's for hardware testing. I get some requests for codes that can be translated to other languages, thus, I reduce as much dependency from the toolboxes as they claimed that it is hard for them to do manual translation. Matlab is only a simulation platform which I use for illustration and demo purposes.

* Caveat:
For reference only.

12 Sep 2011 Mouse Activity Tracking Illustrates mouse activity tracking. Michael Chan

That is an interesting question, and an important consideration for some UI. I will take note of this in the design, and check for options to tune the sampling rate. Thank you for your inputs.

25 Jun 2011 Wiener filter for Noise Reduction and speech enhancement Wiener Noise Suppressor based on Decision-Directed method with TSNR and HRNR algorithms. Michael Chan

how do u set 'IS'? zeros with the same length as the noisy signal?
I get silence.

18 Jun 2011 Generate Exhaustive Permutations Illustrates generation of exhaustive permutation of symbols given the symbolic bases. Michael Chan

Hi Forrest,

For a length of 64, at usage_generateExhaustivePermutation.m

% Caveat: may run out of memory when >= 10;
% note as well that lengthOf1PatternSeq has to be >= length(bases)
lengthOf1PatternSeq = 64;

and

bases = 'ABCD';

Please note the caveat of memory issue, unless your machine has large memory capacity. However, you may wish to run by parts, ie. using another sample usage (computePermutationSeqForSpecificIndex.m), the usage is illustrated by: usage_computePermutationSeqForSpecificIndex.m

You may also convert it to C or java. It can be faster, however, in C, please note on the use of 'malloc' (memory allocation).

07 Jun 2011 QR Code encode and decode Functions to encode and decode a QR bar-code in images Michael Chan

25 Jan 2011 19. MATLAB: “DEBUG” MODE. USE “DEBUG” FOR CHECKING AND ANALYZING PROGRAMS Michael Chan

your posts have been helpful, however, could you provide with English subtitles or English if possible?
Thank you.

25 Jan 2011 ASK, OOK, FSK, BPSK, QPSK, 8PSK modulations. ASK, OOK, FSK, BPSK, QPSK, 8PSK modulations. Michael Chan

Thank you.

25 Jan 2011 ASK, OOK, FSK, QPSK. Digital Modulations and demodulations in SIMULINK. ASK, OOK, FSK, QPSK modulators and demodulators. Michael Chan

Could you provide matlab coded versions?
Thank you.

23 Jan 2011 Image Interpolation (ba_interp2) Fast nearest, bi-linear and bi-cubic interpolation for image data Michael Chan

Hi Brian,

yes, I am using Windows. This also happens to ba_interp3 as well. Could you supply a windows version as well, as though it may be a controversial platforms, there are many such users. Thank you for your efforts.

I really want to put a 5 stars rating, however, I cannot see the effects.

22 Jan 2011 image processing-zooming an image using Bilinear interpolation Bi linear interpolation method has been used here for zooming images by a positive integer factor. Michael Chan

Hi Dimuthu,

I tested your version with Matlab's. However, this is the result:

Matlab inbuilt
--------------
PSNR (interpolatedImage: bilinear) = +29.00789 dB

Dimuthu's version
-----------------
PSNR (interpolatedImage: bilinear) = +35.77969 dB

Error rate: 23.34466 %

19 Jan 2011 Image Interpolation (ba_interp2) Fast nearest, bi-linear and bi-cubic interpolation for image data Michael Chan

Hi Brian,

>> mex -O ba_interp2.cpp
lcc preprocessor error: ba_interp2.cpp:55 Could not find include file <iostream>
Error ba_interp2.cpp: 57 syntax error; found `double' expecting `;'
Error ba_interp2.cpp: 64 syntax error; found `static' expecting `;'
Error ba_interp2.cpp: 72 syntax error; found `static' expecting `;'
Error ba_interp2.cpp: 74 syntax error; found `&' expecting `)'
Error ba_interp2.cpp: 74 skipping `&' `f00_i' `,'
Error ba_interp2.cpp: 75 missing name for parameter 1 to function `indices_linear'
Error ba_interp2.cpp: 75 syntax error; found `int' expecting `{'
Error ba_interp2.cpp: 75 empty declaration
Error ba_interp2.cpp: 75 syntax error; found `&' expecting `;'
Error ba_interp2.cpp: 75 undeclared identifier `f10_i'
Error ba_interp2.cpp: 76 illegal expression
Error ba_interp2.cpp: 76 undeclared identifier `f01_i'
Error ba_interp2.cpp: 77 illegal expression
Error ba_interp2.cpp: 77 undeclared identifier `f11_i'
Error ba_interp2.cpp: 78 illegal expression
Warning ba_interp2.cpp: 78 Statement has no effect
Error ba_interp2.cpp: 78 syntax error; found `int' expecting `;'
Error ba_interp2.cpp: 78 illegal statement termination
Error ba_interp2.cpp: 78 skipping `int'
Error ba_interp2.cpp: 78 undeclared identifier `x'
Error ba_interp2.cpp: 78 too many errors

C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Compile of 'ba_interp2.cpp' failed.

??? Error using ==> mex at 222
Unable to complete successfully.

18 Jan 2011 red colour detection To detect red colour in an image Michael Chan

This may be supplementary to this post. May not be the best I can provide, I hope this helps.

http://www.mathworks.com/matlabcentral/fileexchange/29137-change-1-color-to-another-of-an-image

Thank you for your contribution, Rakesh.

18 Jan 2011 Calculate Time Interval/ Difference To compute time interval, taking into account leap days that are subsumed within that interval. Michael Chan

Hi Jan, I will archive it accordingly. I promptly placed your rendition as I believe you are right that this module is much needed in many features and applications. Indeed, I should have stated in the read me, or store in old archives for formatting sake. My apologies.

I am really happy to think that it's going to make life easier for many people. Thank you, Jan. You make a great difference. ;)

31 Dec 2010 Plot wavelet image (2D) decomposition A short function for displaying wavelet image decomposition coefficients Michael Chan

Thank you, Benjamin. This post is helpful.

17 Dec 2010 Brush Smaller Image Or Matrix Over A Larger Matrix, Select ROI with resizeable window Illustrates how a smaller matrix may be 'brushed' against a larger one without overflowing. Michael Chan

@Jan, Thank you, Jan.

09 Dec 2010 Brush Smaller Image Or Matrix Over A Larger Matrix, Select ROI with resizeable window Illustrates how a smaller matrix may be 'brushed' against a larger one without overflowing. Michael Chan

Hi All,

Please do not debate over this. Jan has been very helpful. Jan, Ghee Leng, Joan, Donn, and a few others are helping to perfect the solutions. I have received some recommended refinements from some of you. I will schedule to look into it. I know all of you have kind intentions, that is why you are here to help people just as the way we have received help from people who are contributing in this domain.

Electronic correspondence can create unnecessary misunderstandings. I assure you that most of us here are trying very hard to help the community. Let's work together.

@Joan, thank you for your moral support. I am very happy that it has made life easier for you. We are all learners. Do share your experiences too. They do make a difference.

09 Dec 2010 meshCanopy Display a mesh above a grayscale image Michael Chan

beautiful.

08 Dec 2010 Calculate Time Interval/ Difference To compute time interval, taking into account leap days that are subsumed within that interval. Michael Chan

Pardon. To deter misunderstanding of what was meant by maintenance. The modelling is designed for translation to other builds, as Matlab is only used for simulation and tracing purposes.

I apologize if this utility is not helpful at all. However, please send refinement and suggestions to the given email so that we may make this utility better, so that we can help people which is the key motivation for this posting.

Thank you.

08 Dec 2010 Calculate Time Interval/ Difference To compute time interval, taking into account leap days that are subsumed within that interval. Michael Chan

Thank you, Jan.
The 'clear all' is to deter collision of variables formally declared. It may messed up your previous keeps. As stated, it is merely a usage for example. My opinion is that there is no point optimizing Matlab, as it is merely for simulation, premature optimization can cause maintenance issue later on. Due to schedule constraints, comments and meaning variable names are designated as refined as possible. Like you, I would like to have the help sections as well. I also like to note that it is more useful putting the help comments at the end, not top. As experienced that, there is alot of unnecessary scrolling when the file is opened.

Your inputs are valuable. The motivation is to help as many people as possible. It is true that the utilities is hardly perfect, they are only for modelling, that is why caveats are always placed. Regression testing is a different domain unaddressed. Could you send me the debugged version? I will update it and ascribed to your help.

Thank you for your help, Jan.

26 Nov 2010 Get points for a line between 2 points You have 2 points, and you want N number of points between these 2 points. Michael Chan

Thank you, it is useful in certain applications.

23 Nov 2010 Toolbox Alpert Transform The Alpert transform is a multiwavelets transform based on orthogonal polynomials. Michael Chan

You are amazing. I believe you will be the next upcoming Prof Mallat or Prof Meyer.

12 Nov 2010 csv2struct reads Excel's files stored in .csv or .xls file formats and stores results as a struct Michael Chan

It's really useful.
just a minor error.

line 78: name = char('A'-1+c);
name = char('A'-1+i);

11 Nov 2010 Brush Smaller Image Or Matrix Over A Larger Matrix, Select ROI with resizeable window Illustrates how a smaller matrix may be 'brushed' against a larger one without overflowing. Michael Chan

Thank you, Sean. An investigation is invoked. Mathworks will look into your concerns.

Please also note that it is clear that the caveat is clear of it's purpose.
* Caveat : Illustrative Purposes

The post is request from my juniors.

11 Nov 2010 Brush Smaller Image Or Matrix Over A Larger Matrix, Select ROI with resizeable window Illustrates how a smaller matrix may be 'brushed' against a larger one without overflowing. Michael Chan

Pardon Sean, clearly it works. My juniors are using the same package. You have modified it erroneously. Try it on window platform.

27 Oct 2010 Change 1 color to another of an image Illustrates the remapping of 1 color to another of an image. Michael Chan

This is good information. I will reference this and modularized it for ease of use and reference for extension. Is there an extant modularized code that can be used?

Thank you, Dirk, for this avenue.

21 Oct 2010 Image Processing with GUIDE Image processing - segmentation - guide MATLAB Michael Chan

Here is an English version.

File Name: IMAGE_PROCESSING_GUIDE_[EnglishVersion].zip
Size: 896.37KB
http://www.sendspace.com/file/hf7d1l

18 Oct 2010 Navigate.m Use the mouse to seamlessly navigate a large figure Michael Chan

I tried the example:
navigate('ex','plot');

however, I get this error:
??? The class "uiextras" is undefined.

could u advise pls? thank u.

15 Oct 2010 File Ordering Patch Utility for MATLAB The utility patches the reordering considering the length of the filename during the sorting. Michael Chan

Pardon the overlapping of the titles on the image display. The focus is on the patch. There is also a uility to display all images under a specified file type. It would also be good if we have an option for display all image types.

Thank you, Douglas Schwarz. I didn't find that initially. I have also always ensure that the coding is intuitive and commented.