Answered
Puzzler: Quickly tell if two absolute indices (a,b) are four connected for n x m matrix.
function flag = isFourConnected(a,b,n,m) % % a,b: indices of interest a ~= b % n,m: size of matrix of interest % ...

14 years ago | 4

| accepted

Answered
difference between "imread" and "load" an image
Images can be saved as files on disk in a variety of formats. The formats are often known by their filename extensions, such as ...

14 years ago | 1

| accepted

Answered
Calculate the average % two stocks are correlated
corrcoeff, perhaps, if you don't want to introduce the possibility of time lags between the stock price sequences.

14 years ago | 0

Answered
put together data of type char
You can use square brackets to concatenate any matrices. For example [A B] puts B to the right of A, whilst [A; B] ...

14 years ago | 0

| accepted

Answered
fractional fourier transform
Use fft2 on each of the colour planes in turn, for example Ft_image(:,:,1) = fft2(Image(:,:,1)); Ft_image(:,:,2) = fft2(Ima...

14 years ago | 0

| accepted

Answered
directions from cartesian xy coordinate pairs
Have a look at the atan2 function. I suspect that xc and yc and the factor of 26 are irrelevant, and you just need something lik...

14 years ago | 0

Answered
std2 ROI
std(Image(logical(binary_mask)))

14 years ago | 0

Answered
Need to compare images with different pixel counts
If you have the Image Processing Toolbox, use *imresize*.

14 years ago | 0

Answered
How is integral image used in image processing?
Here's a simplified example, that relates to the (more complex) ways that SURF uses integral images. Suppose you want to estima...

14 years ago | 1

| accepted

Answered
measure the illumination
No, the camera would need to be calibrated if you want absolute values of the illumination. Even relative values depend on the c...

14 years ago | 0

Answered
problem with if statment
It's because the result from dec2bin is a character string. So each element of the array x represents a character, '0' or '1', f...

14 years ago | 0

Answered
expression substitution
s = 'A=g*ABC+(1-g)*(CAD+d*EEA)+ZI/A'; regexprep(s, '(^|\W)A($|\W)', '$1A_subs$2') *EDIT*: See Walter Roberson's comment for...

14 years ago | 1

Answered
What is your time zone?
GMT+01 (now, summer) GMT+00 (winter)

14 years ago | 0

Answered
Way to tell % complete of script
If the script is already running, no. If * the script has not yet started running * you can identify the main loop * eac...

14 years ago | 0

Answered
move rectangle over te image
If you have an array A, and you want the sum of the values in a rectangle whose top and bottom are rows R1 and R2, and whose lef...

14 years ago | 0

Answered
Signal Processing / Model Evidence !!
In general, you need to make some assumptions about what might have happened to the signals (e.g. addition of noise, non-linear ...

14 years ago | 2

| accepted

Answered
SURF matching
The Euclidean distance between vectors A and B is computed simply using norm(A-B) This applies to SURF descriptor vector...

14 years ago | 0

Answered
convfft vs. fftfilt (1D convolution)
The relative speed depends on the the sizes of the vectors. The best way to find out which is fastest is to experiment - and tha...

14 years ago | 0

| accepted

Answered
Speeded up robust feature(SURF) ?
Not really a MATLAB question - but anyway, the scale at which the feature was detected is used to determine its dominant orienta...

14 years ago | 0

Answered
Padding FFT causes inconsistent arrays when data transferred back to time domain
You could try this: raw = rand(1, 100); FREQDATA = fft(raw, 2^nextpow2(10*length(raw))); % Process FREQDATA here n...

14 years ago | 0

| accepted

Answered
Circle reconstruction algorithm
Have a look at the circle-finding <http://www.mathworks.com/products/image/demos.html?file=/products/demos/shipping/images/ipexr...

14 years ago | 0

Answered
How do I smooth 2D vector field data?
Split your vector field into components (how to do this depends on how it is stored to start with). Smooth each component separa...

14 years ago | 2

Answered
How to measure % intensity difference between 2 image?
imDiff = image1 - image2; imSum = image1 + image2; percentDiff = 200 * mean(imDiff(:)) / mean(imSum(:)); imAdjust...

14 years ago | 0

| accepted

Answered
artifacts of Horn-Schunck velocities
Perhaps by using a method such as feature matching that does not involve smoothing? There are a number of offerings on the file ...

14 years ago | 0

Answered
Basic probability question
You can make a function that you can use instead of rand, like this: p1 = 0.6; % probability of a 1 in the output ran...

14 years ago | 0

Answered
Need help with implementing a 2D elliptical Gaussian function
You can make an elliptical filter aligned with the axes by replacing the second occurrence of c1 by a different variable, say c2...

14 years ago | 1

Answered
Independence Day weekend puzzler
I'm sorry about this one - it's somewhat over the top, and I promise I won't do any more. However, since I think it's a differen...

14 years ago | 0

Answered
Independence Day weekend puzzler
Also one line of code (formatting for the web page will display it over more than one line of text): double(regexprep(char(...

14 years ago | 0

Answered
Independence Day weekend puzzler
One-liner, avoiding string operations: diff([0 (floor((sum(x.*10.^(length(x)-1:-1:0))+1) ./ 10.^(floor(log10(sum(x.*10.^(leng...

14 years ago | 1

Answered
Detecting a string and getting the entire sentence
It is difficult to make a robust and general solution, because you have to define very carefully what makes the start and end of...

14 years ago | 2

Load more