필터 지우기
필터 지우기

Greetings. Does anyone knows how to solve this issue?

조회 수: 1 (최근 30일)
Yusuf Ikmal
Yusuf Ikmal 2023년 4월 1일
이동: Walter Roberson 2023년 5월 7일
  댓글 수: 5
Yusuf Ikmal
Yusuf Ikmal 2023년 4월 3일
Sure. Here is the model. You can try run the model using the given video. Thank you and I hope I can get the solution.
Tran Nam Trung
Tran Nam Trung 2023년 5월 7일
이동: Walter Roberson 2023년 5월 7일
no i don't

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

채택된 답변

Amey Waghmare
Amey Waghmare 2023년 4월 21일
Hi,
As per my understanding, you are encountering an error in the ‘Selector’ block while running the model.
The error is because the input to this block is of size 0. Upon further investigation, I found out that this is because the ‘Pts’ output of ‘Hough Lines’ block in ‘Warning Signal Module’ is empty. This is because the first frame of the video ‘freeway-8356.mp4’ is a complete black image which results in empty ‘Theta’ and ‘Rho’ for this frame and causes the error.
In order to resolve the error, please specify the video file in ‘From Multimedia File’ block without any full black frame. For the ‘freeway-8356.mp4’ video you can remove the first frame in MATLAB using the following code,
clear;
clc;
vid = VideoReader('freeway-8356.mp4');
newVid = VideoWriter('freewayNew.mp4', 'MPEG-4');
open(newVid)
for frameNums = 1:300
I = readFrame(vid);
if frameNums > 1
writeVideo(newVid, I)
end
end
close(newVid)
This will create a new video file ‘freewayNew.mp4’ containing only the frames from 2 to 300 of ‘freeway-8356.mp4’
I hope this helps.
  댓글 수: 1
Yusuf Ikmal
Yusuf Ikmal 2023년 5월 2일
Helo, thanks for the reply. I tried to do as you suggest and it works! Thank you very much. And another question, do I need to do the same method if I try to use different video file?

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by