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?
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
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);
Antworten (1)
Kiran Kintali
am 25 Dez. 2018
0 Stimmen
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
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!