I want to convert this code into hdl, but blockproc function is not an allowed function in hdl code. Hence, not able to convert it. Is there any other function same as blockproc and accepted by hdl coder. If not, then what else can be done?
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
I = imread('flower.jpg');
X = rgb2gray(I);
XD = im2double(X);
T = dctmtx(8);
dct = @(block_struct) T * block_struct.data * T';
B = blockproc(XD,[8 8],dct);
mask = [1 1 0 0 0 0 0 0
1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0];
B2 = blockproc(B,[8 8],@(block_struct) mask .* block_struct.data);
invdct = @(block_struct) T' * block_struct.data * T;
I2 = blockproc(B2,[8 8],invdct);
imshow(I2);
Réponses (1)
Kiran Kintali
le 25 Déc 2018
0 votes
Hi,
You can check hdlcoder supported style of MATLAB code in "matlab\toolbox\hdlcoder\hdlcoderdemos\matlabhdlcoderdemos"
Can you please share your code?
kiran.kintali@mathworks.com
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!