필터 지우기
필터 지우기

Foreground detector is passing a black screen

조회 수: 3 (최근 30일)
Sarvath Sharma
Sarvath Sharma 2020년 7월 17일
댓글: Madhav Thakker 2020년 8월 20일
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
Madhav Thakker
Madhav Thakker 2020년 8월 20일
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?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by