How do you compare matrices A and B?
Show older comments
I do not know what to do and ask questions.
The matrices A and B are as follows.
A = [21, 58;
47, 82;
56, 83;
64, 255;
0, 0 ];
B = [24, 61;
0, 0;
37, 83;
56, 82;
0, 0;
0, 0;
0, 0;
7, 178;
64, 255];
A is the object center coordinates of the previous video frame, and B is the object center coordinates of the current video frame.
I want to delete an object whose center coordinates have not moved more than 3 pixels.
So, we want to get only information about the coordinates where the difference between each coordinate of A and B matrix is more than 3 pixels.
2 Comments
madhan ravi
on 28 Jan 2019
So give an explicit example of your desired output.
Jae Min Lee
on 28 Jan 2019
Accepted Answer
More Answers (1)
KSSV
on 28 Jan 2019
1 vote
Read about knnsearch. Here you can speicfy the distance and pick the points nearest to the given set of points. This function might work for you.
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!