Questions tagged [matlab]

MATLAB (MATrix LABoratory) is a numerical computing environment and a fourth-generation programming language. Use this tag with care.. see excerpt.

Filter by
Sorted by
Tagged with
34
votes
7answers
22k views

Finding squares in Image

I need to find the squares in an image using OpenCV (no problem in matlab or any other, generally what i expect are some ideas). Consider the test image below : I need to find those coloured squares ...
33
votes
5answers
20k views

What Are the Best Algorithms for Document Image Thresholding (Example Inside)?

I'm trying to implement various binarization algorithms to the image shown: Here's the code: clc; clear; x=imread('n2.jpg'); %load original image % Now ...
32
votes
2answers
34k views

What is the advantage of MATLAB's filtfilt

MATLAB's filtfilt does a forward-backward filtering, i.e., filter, reverse the signal, filter again and then reverse again. Apparently this done to reduce phase ...
26
votes
4answers
15k views

How to Extrapolate a 1D Signal?

I have a signal of some length, say 1000 samples. I would like to extend this signal to 5000 samples, sampled at the same rate as the original (i.e., I want to predict what the signal would be if I ...
22
votes
3answers
12k views

How did they color old black and white movies?

This question is on dsp.SE as I'm mostly interested in the signal processing part. There is an Indian movie Mughal-e-Azam which was released in 1960 in black & white which has been reproduced in ...
22
votes
2answers
17k views

How does resizing an image affect the intrinsic camera matrix?

I have a camera matrix (I know both intrinsic and extrinsic parameters) known for image of size HxW. (I use this matrix for some calculations I need). I want to use a smaller image, say: $\frac{H}{2}\...
21
votes
5answers
39k views

How to Remove a Glare / Clipped Brightness from an Image?

I have an image Is there any way of removing the bright white spots ? Please help thanks Edit: After operating with gaussian and then displaying using imagesc get the following output which ...
19
votes
3answers
17k views

Help understanding Hough transform

I'm trying to get a Hough transform to work in MATLAB, but I'm having problems. I have a really bad way of detecting peaks that needs to be fixed, but before that I need to be able to reverse the ...
18
votes
6answers
26k views

How to Generate Band Limited Gaussian White Noise in MATLAB?

In some papers, I read that the additive noise is band limited Gaussian white. How can I simulate this type of noise use MATLAB?
17
votes
5answers
7k views

what is smoothing in very basic terms

What is smoothing and how can I do it? I have an array in Matlab which is the magnitude spectrum of a speech signal (the magnitude of 128 points of FFT). How do I smooth this using a moving average? ...
17
votes
3answers
5k views

Can Gabor filter be used for detecting dents in cars?

I am doing some research on Gabor filters for detecting dents in cars. I know Gabor filters have had widespread use for pattern recognition, fingerprint recognition, etc. I have an image. Using some ...
17
votes
2answers
21k views

Detection of a Circle in Noisy Image Data

I have an image that looks like the one below: I'm trying to find the radius (or diameter) of the circle. I have tried using circular Hough transform (via matlab's ...
16
votes
2answers
29k views

How do I manually plot the frequency response of a bandpass Butterworth filter in MATLAB without freqz function?

I have code like below that applies a bandpass filter onto a signal. I am quite a noob at DSP and I want to understand what is going on behind the scenes before I proceed. To do this, I want to know ...
16
votes
3answers
34k views

Discrete Fourier Transform: What is the DC Term really?

I am currently toying around with the Discrete Fourier Transform (DFT) in Matlab to extract features from images. I like to fully understand the concepts that I use. I have read several explanations, ...
15
votes
3answers
21k views

Designing Butterworth filter in Matlab and obtaining filter [a.b] coefficients as integers for online Verilog HDL code generator

I've designed a very simple low-pass Butterworth filter using Matlab. The following code snippet demonstrates what I've done. ...
15
votes
6answers
5k views

Image segmentation issue of different materials

Hi CV/Pattern Recognition Community, I've got a serious problem regarding the segmentation of an image. The scenario is an atmosphere within a furnace which makes my head go insane. And I need to ...
14
votes
5answers
14k views

Time delay estimation of oscilloscope signals using cross correlation

I have recorded 2 signals from an oscope. They look like this: I want to measure the time delay between them in Matlab. Each signal has 2000 samples with a sampling frequency of 2001000.5. The ...
14
votes
4answers
5k views

ICA - Statistical Independence & Eigenvalues of Covariance Matrix

I am currently creating different signals using Matlab, mixing them by multiplying them by a mixing matrix A, and then trying to get back the original signals using FastICA. So far, the recovered ...
14
votes
1answer
28k views

Converting frequency from $\textrm{Hz}$ to radians-per-sample

In MATLAB I have to pass cut-off frequency for designing a filter. But this Cut-off frequency is in radians-per-sample. How do I convert my analog Cut off frequency in $\textrm{Hz}$, into the required ...
14
votes
2answers
933 views

How can I change the formula to detect the barcode in every angle? - MATLAB

How can I change the formula to detect the barcode in every angle? ...
14
votes
2answers
3k views

Is a high-passed signal the same as a signal minus a low-passed signal?

My question is, if I want to high-pass a signal, is it the same as low-passing a signal and subtracting it from the signal? Is it theoretically the same? Is it practically the same? I have searched (...
14
votes
2answers
53k views

how do I calculate SNR of noisy signal?

I am having problems in understanding how to do it practically I have a wav file that contains pure speech and another ave file that just contains the background noise (can be various things, such as ...
13
votes
12answers
33k views

Deconvolution of 1D Signals Blurred by a Gaussian Kernel

I have convolved a random signal with a a Gaussian and added noise (Poisson noise in this case) to generate a noisy signal. Now I would like to deconvolve this noisy signal to extract the original ...
13
votes
6answers
21k views

Compressive Sensing Through MATLAB Codes

I am new to the topic of compressed sensing. I read a few papers about it by R.Baranuik, Y.Eldar, Terence Tao etc. All these papers basically provide the mathematical details behind it, i.e., Sparsity,...
13
votes
4answers
22k views

Efficiently calculating autocorrelation using FFTs

I'm trying to calculate an autocorrelation on a platform where the only accelerated primitive I have available is the (I)FFT. I'm having a problem though. I prototyped it in MATLAB. I am, however, ...
13
votes
4answers
18k views

How to compute dBFS?

I asked myself how to compute dBFS (dB full scale) from a value of sample between 1 and -1? and in general?
13
votes
3answers
4k views

Is sift a good way to extract features from an image?

I am trying to extract features from an image, but I have failed to get the points that I want to extract, and hence my image fails to match with the template. Are there any checkpoints that I have ...
12
votes
4answers
6k views

Is this a correct method for fixed pattern noise correction?

I am currently involved in a project involving programming an imaging sensor. Our sensor is giving us noise, so we want to correct for it. Someone else on the project came up with the idea to take a "...
12
votes
2answers
69k views

Filtering 50Hz using a notch filter in MATLAB

I've read up a lot about this, but haven't been able to piece everything together successfully, so I'm looking for some help. I need to filter 50 Hz from a signal. It looks like the best options are ...
12
votes
3answers
21k views

What do the filter coefficients in a digital filter represent?

I designed a digital filter using fdatool of matlab and obtained the filter coefficients from the tool. The problem is that i designed a 4th order filter. This gave me 5 filter values ...
12
votes
2answers
1k views

Parametrically degrade the speech to remove emotional content

I am happy to accept suggestions either in R or Matlab, but the code I present below is R-only. The audio file attached below is a short piece of conversation between two people. My goal is to distort ...
12
votes
3answers
1k views

Image processing coding

I was wondering which is the best language for image processing? I know MATLAB has a good library and user community for it. I havent checked it out, its there for python as well. What is the most ...
12
votes
3answers
3k views

Why does my stop-band filter attenuate other frequencies?

Here is my code for a two-toned signal, where I use a stop-band to remove the higher tone and then plotted the before (in blue) and after (in red) in the frequency domain after convolving my signal ...
12
votes
2answers
819 views

Detection of number of yarns in the fabric image

I am a novice user in image processing and working on a project to determine number of yarns in a fabric image i.e. warps and wefts (Perpendicular and parallel yarns to x-axis). I am trying to detect ...
12
votes
1answer
2k views

How to find the convolution kernel in frequency domain?

I have a two vectors of spatial data (each about 2000 elements in length). One is a convolved version of the other. I am trying to determine the kernel that would produce such a convolution. I know ...
12
votes
1answer
929 views

Reconstructing Tree Limbs that are Occluded by Leaves

How would would one approximately reconstruct the branches in a photo of a tree, where portions of the branches are covered by leaves? I can extract the visible portions of the branches by ...
11
votes
2answers
27k views

Image Reconstruction:Phase vs. Magnitude

Figure 1.(c) shows the Test image reconstructed from MAGNITUDE spectrum only. We can say that the intensity values of LOW frequency pixels are comparatively more than HIGH frequency pixels. Figure 1.(...
11
votes
3answers
3k views

MATLAB: $\tt fft$ and $\tt ifft$ scaling

In MATLAB, the outputs of the fft and/or ifft functions often require additional processing before being considered for analysis....
11
votes
2answers
2k views

What Is the Algorithm Behind Photoshop's “Black and White” Adjustment Layer?

Can someone explain the algorithm behind the "Black and White" adjustment layer in photoshop? I have to reproduce it using C++ for an application that emphasizes non-red/magenta(ish) pixels from an ...
11
votes
1answer
24k views

Adaptive Thresholding for liver segmentation using Matlab

I need to segment liver from an abdominal CT image using Adaptive Thresholding. But I get the entire foreground separated from the background alone. I need only the liver part of the foreground ...
11
votes
2answers
1k views

Segmentation of half transparent material, e.g. glass

I'm totally stuck on an issue regarding the segmentation of glassy objects. I need to get the object as precise as possible. My approaches were different. At first I tried to remove the background, so ...
11
votes
3answers
22k views

Apply a Gabor filter to an input image

I tried to apply a Gabor filter with a specific scale (according to my values of lambda and sigma, so it is (7x7) and for 4 orientations (0, $\frac{\pi}{4}$, $\frac{\pi}{2}$ and $\frac{3\pi}{4}$) to a ...
11
votes
3answers
868 views

How to measure the agreement between to curves?

I have values (plotted below) of expected RSSI values over time that I would like to compare with my measured RSSI values. What I was looking for was a way to quantify it so I can change parameters ...
10
votes
2answers
5k views

Why does this manual bilinear transformation yield different results from Matlab's?

I've got a first-order Butterworth filter with the cutoff frequency $\omega_c$. Its transfer function is then $$H(s) = \frac{\omega_c}{s+\omega_c}$$ Using the bilinear transform to find an $H(z)$ (...
10
votes
1answer
2k views

How to remove stains from images?

I have this extremely distorted and stained image Is it possible to remove this stain ? Could image inpainting help ? Please help EDIT : Another image After applying anisotropic diffusion and ...
10
votes
4answers
2k views

Noise removal in medical segmented image

Can anyone suggest methods for removing the noise (indicated inside the red square) from every where in the following image, while keeping the white lines?
10
votes
2answers
4k views

Generate the Convolution Matrix of 2D Kernel for Convolution Shape of `same`

I want to find a convolution matrix for a certain 2D kernel $ H $. For example, for image Img of size $ m \times n $ , I want (in MATALB): ...
10
votes
1answer
3k views

What is the maximal frequency resolution for Matlab's STFT implementation spectrogram()?

Matlab's spectrogram() function calculates the STFT of a signal. It describes its NFFT argument as follows: ...
10
votes
1answer
877 views

Ultrasonic speaker calibration and emitting calibrated signals

I'm trying to calibrate an ultrasonic speaker with the aim of emitting predictable signals, but alas I keep running into trouble, probably due to my lack of DSP-fu. A little background I want to be ...
10
votes
1answer
764 views

How can I automatically classify peaks of signals measured at different positions?

I have microphones measuring sound over time at many different positions in space. The sounds being recorded all originate from the same position in space but due to the different paths from the ...

1
2 3 4 5
53