chandrakant birajdar
Guest
Mon Sep 13, 2010 11:56 am
I am trying to implement 2D filter using VHDL for this i have to give
input as image. So how can i read image file?
Tricky
Guest
Mon Sep 13, 2010 2:03 pm
On 13 Sep, 09:56, chandrakant birajdar <birajdarchandrak...@gmail.com>
wrote:
Quote:
I am trying to implement 2D filter using VHDL for this i have to give
input as image. So how can i read image file?
Are you talking about for testbench or for real hardware.
For testbenches, you can use the read function to read files char by
char (in modelsim at least, other simulators want specific file
headers). This way you can read in file data and do whatever you want
with it.
In real hardware, you will need to send the dataa through the filter
pixel by pixel. so not as straightforward as above.
Paul Colin Gloster
Guest
Wed Sep 15, 2010 1:05 pm
Chandrakant Birajdar <birajdarchandrakant_at_Gmail.com> sent:
|----------------------------------------------------------------------|
|"I am trying to implement 2D filter using VHDL for this i have to give|
|input as image. So how can i read image file?" |
|----------------------------------------------------------------------|
Use an image file in a bitmap format. (So for example, not in JPEG
format.) Each pixel would be stored as a number, so load each pixel as
a number.
It might be useful for you to read relevant parts of a book which
covers at least one graphical file format.
JB
Guest
Wed Sep 15, 2010 3:09 pm
Quote:
Use an image file in a bitmap format. (So for example, not in JPEG
format.) Each pixel would be stored as a number, so load each pixel as
a number.
PGM is a good file format to start with as it is very easy to handle.