I am trying to convert matlab code to verilog HDL (HDL coder), But i am getting the following error, can anyone please suggest a solution.

1 visualización (últimos 30 días)
%FUNCTION
% clear all
% rgbImage = imread('ricesam2.jpg');
% rgbImage=imresize(rgbImage,[480,480]);
function props =New_grading(BinaryImage)
BinaryImage=reshape(BinaryImage,[480,480]);
binaryImage = BinaryImage < 170;
binaryImage = imclearborder(binaryImage);
binaryImage = bwareafilt(binaryImage, [100, 1000]);
props = regionprops(binaryImage, {'Area','Centroid'});
props = struct2table(props);
% Show the result
-----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
%Test_Bench
clear all
rgbImage = imread('ricesam2.jpg');
rgbImage=imresize(rgbImage,[480,480]);
binaryImage = rgbImage(:,:,3);
BinaryImage=reshape(binaryImage,[1,480*480]);
props =New_grading(BinaryImage);
figure imshow(rgbImage, []);
hold on
for kk = 1:height(props)
text(props.Centroid(kk,1)+10, props.Centroid(kk,2),...
num2str(props.Area(kk)))
end

Respuestas (1)

Kiran Kintali
Kiran Kintali el 1 de Mayo de 2021
HDL Code generation from MATLAB requires streaming inputs. Please refer to the following example.
>> mlhdlc_demo_setup('heq')

Categorías

Más información sobre FPGA, ASIC, and SoC Development en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by