Matlab Vehicle / Car Tracking / Kalman Filter / Noise Reducing

4 visualizaciones (últimos 30 días)
MK
MK el 16 de En. de 2019
Respondida: Sulaymon Eshkabilov el 30 de Oct. de 2019
I have the following challenge. I plotted a camera-based distance measurement of a vehicle over the number of frames. As you can see in the picture (y=distance, x=frames), noise causes measurement errors. The measured vehicle could theoretically accelerate or drive constantly. In this case it drives constantly.
Distance_Rausch.PNG
Distance_Rausch_uOhne.PNG
Does anyone have an idea how I can reduce it to reduce this noise during a measurement? The noise distribution is almost constant corresponding to a distance. I am currently trying to find a solution with the Kalman filter in Matlab.
https://de.mathworks.com/help/vision/ref/vision.kalmanfilter.html
https://de.mathworks.com/help/vision/ref/configurekalmanfilter.html
The Kalman approach looks like this:
... % DistObj = Distance values from meausurement
if count < 6
HoldD(count) = {DistObj};
count = count +1;
else
HoldD(1) = [];
HoldD(end+1) = {DistObj};
end
kalman = [];
for idx = 1: length(HoldD)
location = HoldD{idx};
if isempty(kalman)
if ~isempty(location)
stateModel = [1 1;0 1];
measurementModel = [1 0];
kalman = vision.KalmanFilter(stateModel,measurementModel,'ProcessNoise',2,'MeasurementNoise',16); %1e-4
kalman.State = [location, 0];
end
else
trackedLocation = predict(kalman);
if ~isempty(location)
d = distance(kalman,location);
trackedLocation = correct(kalman,location);
else
print('Missing detection');
end
plot(fr,trackedLocation,'co');
hold on
% plot(fr,DistObj,'ko');
% hold on
xlim([-1 nFrames])
ylim([0 70])
end
end
Could somebody help me please?

Respuestas (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov el 30 de Oct. de 2019
Hi,
In your problem, you may employ the moving average filter: movavg() to reduce the influence of the noises.
Good luck.

Categorías

Más información sobre Image Processing and Computer Vision en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by