Azzera filtri
Azzera filtri

Foreground detector is passing a black screen

3 visualizzazioni (ultimi 30 giorni)
Sarvath Sharma
Sarvath Sharma il 17 Lug 2020
Commentato: Madhav Thakker il 20 Ago 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 Commento
Madhav Thakker
Madhav Thakker il 20 Ago 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?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Computer Vision Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by