how to obtain compressed image after neural network training ; in this code i want to display compressed image
1 view (last 30 days)
Show older comments
clc; clear all; close all; I=imread('jay.png'); size(I); image(I); in1=I(1:256,1:256); r=4; figure(1); imshow(in1); in2=blkM2vc(in1,[r r]); size(in2); in3=(in2/255); in4=in3; net_c=newff(minmax(in3),[4 16],{'tansig','purelin'},'trainlm'); net.trainparam.show=5; net.trainparam.epochs=300; net.trainparam.goal=1e-5; [net_s,tr]=train(net_c,in3,in4); a=sim(net_s,in3); figure(2); imshow(a); imwrite(a,'c.png'); fr=vc2blkM(a,r,256); asc=fr*255; az=uint8(asc); figure(3); imshow(az); imwrite(az,'dc.png'); disp('training is achieved');
0 Comments
Answers (1)
sudarshan r
on 14 Mar 2017
try to analyse the code with sim option check documentation for sim
0 Comments
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!