Borrar filtros
Borrar filtros

Foreground detector is passing a black screen

3 visualizaciones (últimos 30 días)
Sarvath Sharma
Sarvath Sharma el 17 de Jul. de 2020
Comentada: Madhav Thakker el 20 de Ag. de 2020
I am currently trying to work on a Smart Traffic System where I want to first detect and track cars in a given video. After doing some research and working I used the vision.ForegroundDetector and the vision.BlobAnalysis libraries. In the given snippet I seem to be having a weird issue. After the first line the image passed in becomes a black screen. As in the image is all black. I tried multiple different methods to change it but cannot seem to find a solution. This is similar to an algorithm that MathWorks implemented themselves and I do not understand why it does not work.
Here is the snippet:
filteredFrame = step(videoObject.detector, singleFrame); <- PROBLEM LIES HERE
% Remove noise and clean the image
filteredFrame = imopen(filteredFrame, strel('rectangle', [3,3]));
filteredFrame = imclose(filteredFrame, strel('rectangle', [15, 15]));
filteredFrame = imfill(filteredFrame, 'holes');
  1 comentario
Madhav Thakker
Madhav Thakker el 20 de Ag. de 2020
How did you create videoObject.detector? You may want to add some details about what different are you doing from the example. Did you refer https://in.mathworks.com/help/vision/examples/detecting-cars-using-gaussian-mixture-models.html example?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Computer Vision Toolbox 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