please explain me that : HDL Coder does not support matrices for code generation. You will need to convert your frame-based design into a pixel-based design suitable for embedding on an FPGA.

2 ビュー (過去 30 日間)
HDL Coder does not support matrices for code generation. You will need to convert your frame-based design into a pixel-based design suitable for embedding on an FPGA.
coder.extrinsic('dctmtx');
I= reshape(ImgVector, 330, 500,3);
%dctmtx - Compute discrete cosine transform matrix.
T = dctmtx(8);
coder.extrinsic('red');
red = (I(:,:,1));
coder.extrinsic('imred');
coder.extrinsic('blkproc');
imred=zeros(size(red));
imred(:,:,1) = uint8(red);
B = blkproc(imred,[8 8],'410*x*500',T,T');
mask = [16 11 10 16 24 40 51 61;
12 12 14 19 26 58 60 55;
14 13 16 24 40 57 69 56;
14 17 22 29 51 87 80 62;
18 22 37 56 68 109 103 77;
24 35 55 64 81 104 113 92;
49 64 78 87 103 121 120 101;
72 92 95 98 112 100 103 99];
B2 = blkproc(B,[8 8],'410.*x',mask);
I2 = blkproc(B2,[8 8],'410*x*500',T',T);
%figure, imshow(I2)
%composante vert
%red = double(I(:,:,1));
%coder.extrinsic('imred');
%coder.extrinsic('blkproc');
%imred=zeros(size(red));
% imred(:,:,1) = uint8(red);
green =(I(:,:,2));
coder.extrinsic('imgreen');
imgreen=zeros(size(green));
imgreen(:,:,1) = uint8(green);
C = blkproc(imgreen,[8 8],'410*x*500',T,T');
mask = [16 11 10 16 24 40 51 61;
12 12 14 19 26 58 60 55;
14 13 16 24 40 57 69 56;
14 17 22 29 51 87 80 62;
18 22 37 56 68 109 103 77;
24 35 55 64 81 104 113 92;
49 64 78 87 103 121 120 101;
72 92 95 98 112 100 103 99 ];
C2 = blkproc(C,[8 8],'410.*x',mask);
I3 = blkproc(C2,[8 8],'410*x*500',T',T);
%figure, imshow(I3);
%composante bleu
%red = double(I(:,:,1));
%coder.extrinsic('imred');
%coder.extrinsic('blkproc');
%imred=zeros(size(red));
% imred(:,:,1) = uint8(red);
blue = (I(:,:,3));
coder.extrinsic('imblue');
imblue=zeros(size(blue));
imblue(:,:,1) = uint8(blue);
D = blkproc(imblue,[8 8],'410*x*500',T,T');
mask = [16 11 10 16 24 40 51 61;
12 12 14 19 26 58 60 55;
14 13 16 24 40 57 69 56;
14 17 22 29 51 87 80 62;
18 22 37 56 68 109 103 77;
24 35 55 64 81 104 113 92;
49 64 78 87 103 121 120 101;
72 92 95 98 112 100 103 99];
D2 = blkproc(D,[8 8],'410.*x',mask);
I4 = blkproc(D2,[8 8],'410*x*500',T',T);
%figure, imshow(I4);
coder.extrinsic('image');
image=zeros(size(red,1),size(red,2),3);
image(:,:,1)=I2;
image(:,:,2)=I3;
image(:,:,3)=I4;
%imshow(image);
%figure,

採用された回答

Walter Roberson
Walter Roberson 2017 年 3 月 2 日
The basic issue is that using matrices implies that the entire matrix is passed at the same time, which requires one pin per bit per matrix element, or at the very least one pin per matrix element strobed once per bit to get the data in simultaneously. FPGA seldom have enough pins for that. The cure is to essentially vectorize the matrix for transfer into the FPGA, and then reshape it inside the FPGA if need be. The "frame to pixels" block provides tools to do that vectorization in a structured way that allows the matrix to be recreated easily.
  1 件のコメント
jebli med
jebli med 2017 年 3 月 2 日
編集済み: Walter Roberson 2017 年 3 月 2 日
sir where i use this in my code matlab or where ?? sorry that was my first time i use that

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCode Generation についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by