Error in running the Scene change detection example in CV system toolbox

조회 수: 3 (최근 30일)
Hi, I am trying to use the example "Scene change detection" in Computer Vision system toolbox http://www.mathworks.in/help/vision/examples/scene-change-detection.html?prodcode=VP&language=en . The video example chosen in the example works fine for it but If i run it on any other video then I get error like this:
Matrix dimensions must agree. Error in scenechange (line 65)
edge_diff = abs(mean_blks - mean_blks_prev);
What does the matrix dimensions differ on any other example and not on the example video used? How can I fix this?

채택된 답변

Anand
Anand 2013년 3월 21일
Replace the following line:
mean_blks_prev = zeros([15, 1], 'single');
with
mean_blks_prev = zeros([numel(X),1], 'single');
That should do the trick.
  댓글 수: 3
Shekhar
Shekhar 2013년 3월 26일
Also what was the problem? Can you explain a bit?
Anand
Anand 2013년 4월 1일
The block size was hard-coded. When you used a different video, the sizes were different and so it bombed out.

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

추가 답변 (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