Questions tagged [c++]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
94 views

difficulties implementing windowed sinc interpolation (C++)

I'm currently trying to implement a windowed sinc interpolation. I've already written some code for that, but it only seems to work for cases where phaseInc <= 1.0 (phaseInc = outSampleRate / ...
0
votes
1answer
748 views

What does opencv `mean` function do when passing a mask of zeros?

INTRO I am looking at this project to implement some changes. The project is written in C++ using openCV library. Its goal is to detect cars in parking area to calculate the number of free spots. It ...
0
votes
1answer
48 views

STFT Spectrum Analyzer: power drops over 15 kHz with songs, not with pure signals

I'm developing an audio file spectrum analyzer for a University Project. My main goal is to have an application that plots the Db Spectrum of a 16 Bit WAV PCM audio file (at this time only mono files) ...
0
votes
0answers
38 views

Convolution library on Arduino

Does anyone know of a good convolution library in C++ that can be implemented on an Arduino. I'm using it to apply matched filters to a signal. Thanks, Luke
0
votes
1answer
249 views

Programming the IDWT for image processing

I want to program the 2D inverse discrete wavelet transform (only 1 level) in the case of image processing. In the matlab website there's this diagram: now, I want to program the IDWT with haar ...
0
votes
0answers
20 views

IT++ and Alternatives DSP Libraries

I want to implement some signal processing blocks in C++ so I did a bit of search on the available libraries for signal processing in C++ and I found that IT++ provides comprehensive set of functions, ...
0
votes
1answer
389 views

ICY feature detector and edge detector in opencv

I need to trace the internal feature boundaries of blobs (blood cells) in OpenCV to train a classifier. As a good reference from ICY in java, the following sequence of operations gives good, ...
2
votes
3answers
1k views

Aquila DSP C++ Library - Wave file FFT analog frequency off by factor of 4?

I'm working with the Aquila C++ DSP library. I'm computing the FFT of a wave file (16 bit depth, single channel, 44100 sample rate). I am using a window size of 16384 to calculate the FFT spectrum. I'...
5
votes
5answers
7k views

Fastest implementation of fft in C++?

I have a MATLAB program that uses fft and ifft a lot. Now I want to translate it to C++ for production. I used OpenCV but I ...
0
votes
1answer
3k views

Calculating the SNR of Audio Signal (Recommended Libraries)

Are there any open source packages or libraries available which can be useful in calculating the SNR(signal to noise ratio) of an audio signal. The input will be just an audio signal and I have to ...
0
votes
0answers
36 views

Is it possible to analyze this microphone data and what to do if not?

I just created an account here because I really need some help. I'm using a microphone pmodmic3 with a development board called Ublox C030-U201 which uses the mbed OS. The microphone is working for ...
0
votes
1answer
27 views

How to change the shape of a function generator keeping the rate?

I'm making a sort of Envelope Function Generator. At the moment, I'm calculating only the the "rise" stage, which goes from 0 to 10 V; than, brutally, I back it to ...
0
votes
0answers
45 views

Artifacts observed in STFTs computed with C++ library FFTW3 or NE10

In one of my projects, I have to compute stfts with audio signals coming either from a microphone or a .wav file in a C++ based program. However, I am observing different artifacts due to my stft ...
0
votes
2answers
49 views

How do you properly organize data to compute multiple (independent) recursive filters at the same time taking advantage of SIMD instructions?

I'm processing multiple (independent) Exponential Moving Average 1-Pole filters on different parameters I have within my Audio application, with the intent of smooth each param value at audio rate: <...
0
votes
1answer
368 views

Doing audio processing with DFT on a microcontroller

I have written an audio processing application in C++ which runs on a desktop windows computer. My next step is to implement this on an embedded system using a microcontroller, preferably arm-based. ...
1
vote
1answer
160 views

Signal in frequency domain with OpenCV dft

I am experimenting with cv::dft: a 1HZ sinus signal is generated, and displayed in the frequency domain. But for some reason it hasn't got the maximum component at ...
0
votes
1answer
544 views

Block normalization of histogram of oriented gradient

I am a beginner in image processing. I have some questions regarding HOG. https://www.learnopencv.com/histogram-of-oriented-gradients/ From this website, it mentioned that each element inside the ...
1
vote
1answer
3k views

Create 16 bit sine and write to file

This seems a simple task, yet I am making some stupid mistakes I am not able to find. I create a sinus wave (integer) and then convert it to 16 bit char, little endian. Then I save to file and open it ...
0
votes
2answers
385 views

Why Is Non Linear Least Squares Method from MATLAB and Alglib Gives Different Results on the Same Data?

i'm trying to rewrite my Matalab prototype for some DSP to C++ and encountering a displeasing problem. I'm trying to fit data to a function $y = a * (\pi / 2 + arctg(b * x))$. In Matlab it works well ...
0
votes
2answers
1k views

Parameters of Gaussian Kernel in the Context of Image Convolution

Hi Everyone i am new at image processing. I copy code from this website, I have image $600 \times 480$ gray scale. What will be the value of standard deviation or $\sigma$? What will be the value of ...
1
vote
0answers
33 views

Is the behaviour of the following filter plausible?

I've designed a filter based on this equation $$ E(u) = \frac{1}{2}\int_{\Omega} \left[(u-f)^2 + g(\lVert \nabla u \rVert)\right]dxdy $$ Euler-Lagrange equations in this case are (should be) given ...
0
votes
0answers
41 views

Output of a bank of gabor filters, derive ellipses like regions

I'm trying to implement an algorithm that show how to detect wrinkles in clothes, without going to much into details this is the step that is confusing me. Assuming we have an image $I$ and a set of ...
1
vote
0answers
83 views

How to generate the amplitude of a signal with a certain power spectral density?

I am a newbie. If I posted a question someone else already asked, please forgive me. Thank you! Now, I have a power spectral density named $P(f)$ as a function of $f$. Let's say this function is ...
0
votes
1answer
77 views

DSP using audio IO from PC using C++

This is my first question on dsp. I am looking for something very simple here and I am sure there are libraries that will do pitch recognition and FFT but my requirement is very simple. I have a PC ...
0
votes
1answer
104 views

Windows Audio WAVEFORMAT buffer BYTE to 16-bit int

I am trying to understand audio-buffer processing at the low-level for the first time. I have the following C++ code copying WAVE-format byte data from capture buffer of Window Core Audio (*ppData in ...
2
votes
2answers
4k views

How to remove noise from this image without causing the crack to 'shrink'?

I am currently embarking on an image processing project to detect cracks on surfaces using OpenCV and Visual Studio via C++. I have tried writing my program and at the moment, I am stuck because I ...
0
votes
1answer
420 views

PortAudio: how to generate multiple sounds

I have simple wave generator in PortAudio. I'm creating single sine wave, and then I use a lookup sine to play it. Now I've stucked here. I have no idea how I can add another sine sound. Is it ...
0
votes
1answer
1k views

What exactly is “sparse representation”? [closed]

I saw a recommended topic for the final project in my university called "dsp and dip applications using sparse representation techniques (MATLAB, C, C++)". I consider taking this topic as my final ...
0
votes
1answer
666 views

Implementation of the filter function (Matlab) C/C++

I am trying to apply some filtering in C/C++ code, I have designed an algorithm using Matlab and it works well, so now I am moving it to native code. I am ...
2
votes
0answers
387 views

PortAudio: sound fade in/out by scaling sample data

I've done already some fade in or fade out effect in portaudio, but that is not working properly. My callback function: ...
0
votes
1answer
608 views

Why entropy is undefined in low contrast image

I am trying to measure contrast of image by entropy of histogram of image. Code for computing entropy ...
1
vote
2answers
453 views

Power spectrum of a pure sine problems

I am writing a C++ program to use to analyse oscillations and create a power spectrum. I am using FFTW3. To test the system, I am using a perfect sine function. But no matter what parameters I try, ...
0
votes
1answer
60 views

Determining the pattern direction of a bitmap image

How can I obtain average direction of the pattern shown in the figure below. It is the direction of the red arrow relative to the yellow (horizontal) line. Any ideas for an approach? I couldn't figure ...
2
votes
2answers
899 views

Find smoothed first derivative from signal with noisy slope

How can I get filtered first derivative from a noisy signal that has slowly changing slope in form of y=kx+b? k can slowly ...
1
vote
1answer
2k views

Using a Kalman filter to predict samples between measurements

(cross posted from stack overflow) I have a dataset where measurements were taken at 10 Hz, and I am trying to use a Kalman filter to add predicted samples in between the measurements, so that my ...
0
votes
1answer
428 views

How can i measure soundcard latency?

I want to write sonar/radar like sample application. For sake of simplicity (and not to use Arduino and specialized RTOS) - I simply used using audio in/out analog ports of a motherboard integrated ...
0
votes
0answers
592 views

Distance from an object.. Where is the camera origine?

I compute the distance from an object (Chessboard) using OpenCv and my camera parameters using those steps: findChessboardCorners solvePnP ->Distance The distance I get is between two points: the ...
0
votes
1answer
44 views

A PID that can handle 2 inputs for my application

I am currently working on a Drone that navigates to different points that it detects on the ground. To go from one point to another in a smooth manner, I am employing a PID looks at the error between ...
0
votes
1answer
187 views

Two question about RBJ Peak filter

I'm new into DSP and Filters in general. Its the first step ahead I do from learning and using a 1-pole IIR basic Low Pass Filter. I'm about to implement for my VST audio application (using C++ and ...
1
vote
2answers
1k views

C++ based FIR filter design using GNU Octave remez function [closed]

I am designing a system where I want a FIR filter coefficient generator feature. I try the remez.cc source file provided in the Octave Signal package. The source code for remez.cc is here. I have ...
3
votes
3answers
2k views

Vein extraction from this image

I have this image: What methods should I use to extract the veins from this image. Thank you.
1
vote
0answers
1k views

Line Detection with OpenCV

I'm trying to use the native functions of OpenCV HoughLines and HoughLinesP to detect the lines from an image. The Canny edge output of that image is the folllowing: The problem is that the OpenCV ...
-1
votes
1answer
2k views

Wavelet-based C/C++ Peak finding libraries

What wavelet-based peak finding functions are there for C++? I'm looking for something similar to: http://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.signal.find_peaks_cwt.html. ...
1
vote
0answers
408 views

Upsampling with FIR filter causing discontinuity at start of new buffer [closed]

I have implemented an oversampling algorithm for an audio signal in C++ which is producing a distortion of the signal at the start of a buffer. The algorithm is wrapped in a class with methods for up ...
0
votes
1answer
996 views

Which pattern (circle pattern or checkerboard pattern) should be used for automotive camera calibration (fisheye/wide webcam)?

Calibrating a Fish-eye camera / webcam with large angle mounted on car by using opencv 3 One important issue is to define the calibration pattern and its position !!!! The affects error that paly an ...
-1
votes
1answer
114 views

Add padding to object in 4-channel image

I have a 4-channel image (.png, .tif) like this one: I am using OpenCV, and I would like to add padding of type BORDER_REFLECT around the flower. ...
1
vote
1answer
3k views

Basic FIR Filtering with audio buffer in C++

I am willing to implement a basic FIR filter using C++ and JUCE. I wrote this simple algorithm using the information I found in the DSPGuide, but I only seem to get a variation in volume for all the ...
0
votes
1answer
4k views

How to detect all the connected neighboring pixels which have same color value in opencv

I should be able to input a pixel position and get all the same coloured(in my case it should be black) pixels which are connected to it. How to do this in opencv with c++. Simply the output pixels ...
0
votes
1answer
2k views

Aplying FFT to Wav file data

Technology: C++, CodeBlocks IDE. I've just read sample wav file (source - http://www.wavsource.com/snds_2015-12-13_4694675918641206/movies/2001/daisy.wav ) with an txt output (https://paste.ee/p/...
0
votes
2answers
4k views

Blending artifacts in OpenCV image stitching

I am using OpenCV to blend a set of pre-warped images. As input I have some 4-channel images (*.png or *.tif) from where I can extract a bgr image and an alpha mask with the region related to the ...