필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Image Processing SIMULINK Array error

조회 수: 1 (최근 30일)
Jayden  Hasemann
Jayden Hasemann 2017년 10월 9일
마감: MATLAB Answer Bot 2021년 8월 20일
I am doing some image processing on SIMULINK as part of a control system. I have written a code up in Matlab which detects the amount of a certain range of colour and then determines the percentage of that colour in the enitre image. This is seen here:
vals=reshape(HSI,[],3);
map= (vals>=[0.17 0 0.41] & vals<=[0.48 0.07 0.99]);
map2= all(map,2);
percentage=sum(map2,1)/numel(map2)*100;
When I use a matlab function block in simulink however i get this error. Note the image (called HSI) is coming from a 'From Video Device' Block.
Size mismatch (size [307200 x 3] ~= size [1 x 3]).
Function 'Prediction_alg' (#36.429.448), line 11, column 7:
"vals>=[0.17 0 0.41]"
Launch diagnostic report.
I think this is because simulink does not reshape the image, but I am unsure. Any help on this issue will be greatly appreciated.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by