Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [input network] = CreateNetwork( path, width, height )
- %CREATENETWORK Summary of this function goes here
- % Detailed explanation goes here
- img = imread(path);
- img = 1-im2double(img(:,:,1));
- img = img == 1;
- colormap(gray);
- img = 1-img;
- imagesc(img);
- tileW = size(img, 2) / width;
- tileH = size(img, 1) / height;
- cols = (im2col(img, [round(tileH) round(tileW)],'distinct'));
- input = unique(cols', 'rows', 'stable')';
- T = input * 2 - 1;
- network = newhop(T);
- end
Add Comment
Please, Sign In to add comment