281 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
74
views
Differences between OpenCV and FFTW 2D DCT
I am trying to figure out how to match the output from FTTW to OpenCV's 2D DCT. It looks like the output is scaled in some way related to square root of the number of rows and columns, if the rows or ...
0
votes
1
answer
151
views
Getting black images while applying discrete cosine transform (DCT) on image
Getting black images while applying discrete cosine transform (DCT) on image
def perform_dct(image_path):
# Load the image in grayscale
img = cv2.imread(image_path, cv2.IMREAD_GRAYSCALE)
...
0
votes
0
answers
43
views
For a 2D single channel image, what is an appropriate criterion to reorder the rows, such that a JPEG-like encoder performs the best?
I have a huge amount of time series data, each representing some observations at a certain position. Thus of course there exists spatial correlation. I am trying to reorganize these lines of ...
0
votes
1
answer
179
views
Does FFT and IFFT implicitly assume circular convolution? Does DCT assume the same?
if I put zeros at the end of an input sequence, and take fft, then take ifft of a greater length by appending zeros to the fft output, will the zeros of the input sequence reflect on the final ifft ...
1
vote
2
answers
109
views
Using DCT to create real-time "levels" animation for microphone input
For context: I'm trying to create a simple "level monitor" animation of audio data streaming from a microphone. I'm running this code on an iOS device and leaning heavily on the Accelerate ...
0
votes
0
answers
121
views
How to extract DCT coefficient matrix by jpeglib in python?
I have the below code and i get this error:
File "C:\Users\omar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jpeglib\functional.py", line 71, in read_dct
return DCTJPEG(
^^^^^^^...
0
votes
1
answer
71
views
Min-max scaling on DCT coefficients
If I do DCT on an input value with pixel range [-128, 127], next how do I min-max scale this DCT transformed output? What should be my maximum and minimum DCT values that I can use to find the [0,1] ...
0
votes
1
answer
123
views
How to "de-orthogonalize" type 2 DCT result
I have been given the task of rewriting some python code into a different language. A piece of that codes makes use of the standard 2-D DCT in scipy. I honestly don't have much clue about different ...
1
vote
1
answer
110
views
DCT method of MATLAB doesn't work in Kotlin Android
I am passing an array of 64 bits/elements to DCT function. But when I send the dctResult (obtained from DCT) to IDCT for inverse, I don't get the same values what I passed to DCT function.
Below is ...
0
votes
0
answers
58
views
FFTW fftwf_plan_r2r_2d() with FFTW_REDFT01 equivalent to idct2 in matlab
What's the proportional relation between idct2 in MATLAB and FFTW_REDFT01?
The answer in 'FFTW fftwf_plan_r2r_2d() with FFTW_REDFT01 equivalent'
The following relation seems incorrect:
resFFT /= (4 * ...
-1
votes
1
answer
176
views
How do I reconstruct all Fourier coefficients from 2D r2hc transform in FFTW?
I have 3D real data, say, 64 * 64 * 64 real data points, and I want to do a 3D Fourier transform. Specifically, I want to do DFT (exponential transform, containing both sine and cosine terms) on two ...
1
vote
1
answer
500
views
Lua - Ability to encode JPEG using DCT (discrete cosine transform)
I’m looking to find a library and/or guide that would allow me to encode an image with DCT (discrete cosine transform ) so I can place it in a basic 1.0 pdf file. (FYI I’m using https://git.catseye.tc/...
1
vote
0
answers
149
views
How to increase fft time resolution also frequency resolution at the same time?
I'm a newbie learning FFT, I'm writing fft using swift vDSP to process audio from the microphone.
My goal is to fine-tune the calculation to 0.1 Hz on the audio whose frequency changes every 0.1 ...
2
votes
1
answer
154
views
DCT julia equivalent to scipy.fftpack.dct
I wonder how I could compute the following in Julia
import scipy.fftpack
scipy.fftpack.dct([1,2,3], axis=0)
array([ 1.20000000e+01, -3.46410162e+00, -4.44089210e-16])
I have seen that FFTW.jl seems ...
1
vote
0
answers
90
views
JPEG Specification Questions: Walking through my current understanding to hopefully find what is wrong
I want to make a JPEG where for each of the 3 components (Y, Cb, Cr), you encode a 8x8 block one after another, and then move to the next 8x8 block in the image.
E.X.
A 16x16 image exists.
write ...