Neighborhood filtering of different images

2 visualizaciones (últimos 30 días)
Jihye Jung
Jihye Jung el 8 de Oct. de 2019
Respondida: Sid Singh el 22 de Oct. de 2019
Hello, I have this grayvalue image.
I got 2 different images from sensor, and I sort centroids of reference (red x) and distroted image (green x).
I overlays reference centroids (red x) on distorted image (green x).
But I have trouble to calculate differences between centroids because I have different matrix size of centroids of reference and distorted images.
For the reference image, I got (160 x 2). / For the distorted image, I got (163 x 2).
I attached sortedcentroids1 (reference) and sortedcentroids2 (distorted).
area_compare spots.bmp
I want to filter out the centroids by using neighborhood filter within certain area, but I have no idea to do this.
I only tried like this to make a function, but it is not related to the neighborhood detection.
Can someone please provide a good idea for me to solve this problem?
else numel(sortedcentroids1(:,1)) < numel(sortedcentroids2(:,1))
f = find(abs(sortedcentroids2(1:numel(sortedcentroids1(:,1)),2)-...
sortedcentroids1(:,2))>100);
sortedcentroids2(f(1),:)=[];

Respuestas (1)

Sid Singh
Sid Singh el 22 de Oct. de 2019
Hi, you can use knnsearch to find the nearest neighbours to reference centroids. In your case, distorted points are missing for some reference points and vice versa but some points are very close for which I hope you want to compute the difference.
After doing the 1 nearest neighbour search for every reference point, threshold out those which are too far from normal and take the difference of the remaining points.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by