Extract data from an grayscale image

47 visualizaciones (últimos 30 días)
solleti prabhakarchary
solleti prabhakarchary el 5 de Nov. de 2025 a las 2:07
Comentada: William Rose el 8 de Nov. de 2025 a las 4:24

I need to extract data from a sequence of image frames (extracted from a high-speed schlieren video in .mraw format) to perform Dynamic Mode Decomposition (DMD) and Fast Fourier Transform (FFT) analysis. The goal is to analyze the unsteady shock structures on the object by selecting a Region of Interest (ROI) within the images. Please help me write a MATLAB script that processes these frames, performs DMD and FFT analysis, and extracts the corresponding frequency and amplitude data from the selected ROI.

  5 comentarios
Chuguang Pan
Chuguang Pan el 5 de Nov. de 2025 a las 13:21
Editada: Chuguang Pan el 5 de Nov. de 2025 a las 13:27
The grayscale image sequency of high-speed video is a 3D tensor with dimention SST(S: space, T-time). The fft function can operate along different dimension.
imgSeqs = rand(64,64,50);
imgFreqs = fft(imgSeqs,[],3);
imagesc(imtile(abs(imgFreqs)))
William Rose
William Rose el 8 de Nov. de 2025 a las 4:24
If you have extracted the grayscale images from the video file, then you have an array BigX with dimensions N,M,L, where the image size is N-by-M and there are L frames.
Assuming the region of intrerest (ROI) is bounded by u1,v1 at the top left and u2,v2 at bottom right, where 0<u1<u2<=N and 0<v1<v2<=M, then
N=100; M=120; L=50; % raw video size
BigX=rand([N,M,L]);
u1=21; v1=11; u2=75; v2=70; % ROI corners
X=BigX(u1:u2,v1:v2,:); % extract ROI data
fprintf('Raw video: %d,%d,%d rows, columns, frames.\n',size(BigX))
Raw video: 100,120,50 rows, columns, frames.
fprintf('ROI video: %d,%d,%d rows, columns, frames.\n',size(X))
ROI video: 55,60,50 rows, columns, frames.
You will have to decide what algorithm to use for DMD. The Matlab File Exchange has a number of DMD submissions (here). Read the descriptions, and choose one package to download and investigate. Another DMD package for Matlab which I would consider, if I were doing this project, is here: https://github.com/MColbrook/DMD-Multiverse. The author, Matthew Colbrook, descirbes the package in detail in this article.
You also stated "I need to perform ... FFT analysis to extract frequency vs amplitude and findpeaks." Please be more specific about what Fourier analysis you wish to perform: full 3D, or 2D or 1D. If 2D or 1D, then along what dimensions? Explain what you want to do with findpeaks(). findpeaks() operates on vectors (1D data), not arrays. There is a user-submitted function peaks2() in the File Exchange that operates on 2D arrays. Perhaps it is useful to you.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by