Forum Discussion
Altera_Forum
Honored Contributor
17 years agoTaking image as input
Hello friends.....i am trying to do image processing using DE2 board in verilog hdl and i had written the code...but i got stucked at taking image as input and to load it into the memory on the board...
Altera_Forum
Honored Contributor
17 years agoYou must read the image:
I=imread('your_image-bmp'); Resize the image in order to access it from a plain rom Ir=reshape(I',prod(size(I)),1); Now you can generate your mif file: miffile('your_image.mif',Ir,8,length(Ir)) Each pixel is coded using 8 bits. (gray scale images). If you are going to process true color images, you should instance 3 memories for each color plane. This .mif file can be used in an altsyncram megafunction instantiated in ROM mode. The index_rom is the address of the altsyncram. This logic must be implemented in your hardware.