Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Image Processing SIMULINK Array error

1 visualización (últimos 30 días)
Jayden  Hasemann
Jayden Hasemann el 9 de Oct. de 2017
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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.

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by