Shrediquette / PIVlab

Particle Image Velocimetry for Matlab, official repository
https://shrediquette.github.io/PIVlab/
MIT License
126 stars 30 forks source link

Auto-ignore low contrast regions? #24

Closed Shrediquette closed 3 years ago

Shrediquette commented 3 years ago

Maybe it is possible to automatically ignore regions with low contrast (that wouldn't give any reasonable correlation matrix anyway). Maybe, before analysis, we can find the standard contrast per interrogation area (slightly lowpass the int area, then subtract min intensity from max intensity). Interrogation areas that are below 5% of the average contrast level are automatically assigned a mask (or simply assigned NaN). This could save a lot of work masking images. I think the best way would be to have an extra function that is run before cross-correlation, and that automatically generates a mask. But this enhancement will be slow I think.

Shrediquette commented 3 years ago

Correlate image A with some noisy version of image A, find local correlation coefficient. This might give a map with the "local contrast".

Shrediquette commented 3 years ago

Before cross correlation: check if abs(mean(A-B)) is above a certain threshold...? -> No, this will ignore identical int areas... Check if there is texture...: 2D gradient. If below threshold, ignore low numbers...? E.g. [GX gy]=gradient(A) mean(abs(GX(:))+abs(Gy(:)))

Shrediquette commented 3 years ago

implemented in 2.44