OpenCores
URL https://opencores.org/ocsvn/canny_edge_detector/canny_edge_detector/trunk

Subversion Repositories canny_edge_detector

[/] [canny_edge_detector/] [trunk/] [vhdl_testbench/] [writefile.m] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 angelobacc
%uncomment if using Octave
2
%pkg load image
3
 
4
a=imread('shapes2.bmp');
5
%a=imread('car.jpg');
6
%a=imread('radio.jpg');
7
a=imread('berlu.png');
8
a = rgb2gray(a);
9
a=a';
10
b=a(:);
11
 
12
currentFile = sprintf('inputdata');
13
FID = fopen(currentFile, 'w');
14
 
15
 for i=1:1:length(b)
16
     fwrite(FID,b(i),'uint8');
17
     fwrite(FID,0,'uint8');
18
     fwrite(FID,0,'uint8');
19
     fwrite(FID,0,'uint8');
20
 end
21
 
22
fclose(FID);
23
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.