Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c++]

The tag has no usage guidance.

-1
votes
0answers
8 views

How to implement Just Noticeable Difference(JND) of an Image [on hold]

I want to implement the algorithm of 'Just Noticeable Difference'(JND) of an Image with python-opencv or c++.
0
votes
0answers
12 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
34 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
18 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
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
26 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
32 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
1answer
56 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
2answers
48 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: <...
1
vote
1answer
117 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
565 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 ...
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
40 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 ...
0
votes
1answer
2k 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 ...
1
vote
0answers
82 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
2answers
333 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
1answer
72 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
94 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 ...
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
417 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 ...
2
votes
0answers
332 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
379 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
228 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
1answer
538 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 ...
0
votes
1answer
590 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 ...
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
805 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
1k 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
397 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
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 ...
0
votes
0answers
559 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
179 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 ...
0
votes
1answer
352 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
2answers
943 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 ...
0
votes
1answer
371 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, ...
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
vote
2answers
443 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, ...
1
vote
0answers
371 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 ...
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
958 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
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 ...
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'...
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 ...
-1
votes
1answer
113 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
0answers
41 views

Get level of wellness in a cascade classifier using LBP

I'm currently working in a Lolipop LBP cascade detector using OpenCV. The training is correctly done and the cascade classifier detects the sticks of the Lolipops correctly but with some minor errors. ...
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 ...
2
votes
1answer
870 views

VIbrato (pitch variation) function

I'm looking for an algorithm for Vibrato audio effect for a cross-platform C++ program of audio processing. Now I use the realization from Chaotic-DAW sources. The problem is that Chaotic-DAW has a ...
2
votes
1answer
2k views

NORM_HAMMING2 vs NORM_HAMMING

I'm trying to use ORB features with a cv::BFMatcher. ORB is based on binary descriptors so HAMMING must be the choice, but I'm not sure I understand the difference ...
2
votes
1answer
687 views

removal of blackman harris window results in signal higher than expected

We are capturing data using a PX14400 adc. The samples are 16bit unsigned integer, 200M samples/sec, I data only. 100MHz bandwith. We have a cw signal at 51MHz, -11.4dBm. The -11.4dBm is measured ...