You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.
hi, @jonbarron, thanks for sharing the codes of the ffcc. I can't understand the meaning of the conv operations in the function "RenderHistorgramGaussian". The code is as follow,
% Threshold the mahalanobis distance at 3 to make a binary mask, which is
% dilated to produce an ellipse with a dot in the center.
mask = mahal_dist <= 3;
prediction = (conv2(double(mask), ones(3,3), 'same') > 0) & ~mask;
prediction = prediction | (conv2(double(mahal_dist == min(mahal_dist(:))), [0, 1, 0; 1, 1, 1; 0, 1, 0], 'same') > 0);
% Optionally create a mask with the ground-truth white point rendered as a dot.
if ~isempty(mu_true)
D = (us - mu_true(1)).^2 + (vs - mu_true(2)).^2;
truth = D == min(D(:));
truth = (conv2(double(truth), [0, 1, 0; 1, 1, 1; 0, 1, 0], 'same') > 0);
truth = (conv2(double(truth), [0, 1, 0; 1, 1, 1; 0, 1, 0], 'same') > 0);
I want to ask the questions,
What's the meaning of the function conv2(double(mask), ones(3,3), 'same') > 0) ?
I can understand the formula about mahal_dist == min(mahal_dist(:) to get the ellipse of the minmum distance. However, i can't understand why to run the conv operation of the formula conv2(double(mahal_dist == min(mahal_dist(:))), [0, 1, 0; 1, 1, 1; 0, 1, 0], 'same') and why to chose the matrix [0, 1, 0; 1, 1, 1; 0, 1, 0] .
Why are the two same conv operations with conv2(double(truth), [0, 1, 0; 1, 1, 1; 0, 1, 0], 'same') ?
Look forward to your favourable reply ! @jonbarron
The text was updated successfully, but these errors were encountered:
mahal_dist == min(mahal_dist(:) just makes a single pixel at the argmin, and then it's convolved by a plus shape to make a plus. This is just because I wanted a plus shape at the center.
Convolving by [0, 1, 0; 1, 1, 1; 0, 1, 0] twice just gives a nice diamond shape.
All of this code is just for visualizing the results, and isn't critical to the algorithm.
hi,
@jonbarron, thanks for sharing the codes of the ffcc. I can't understand the meaning of the conv operations in the function "RenderHistorgramGaussian". The code is as follow,
I want to ask the questions,
Look forward to your favourable reply !
@jonbarron
The text was updated successfully, but these errors were encountered: