Re: how to read jpg file using VHDL



On Oct 15, 4:45 am, Brian Drummond <brian_drumm...@xxxxxxxxxxxxx>
wrote:
On Wed, 15 Oct 2008 01:43:49 -0700 (PDT), raj <rajashree....@xxxxxxxxx>
wrote:

i want VHDL code of reading an image....and view that image after
processing.......with explaination.....i know about TEXTIO
package.......but how to use that.....??

Since a JPG image is not a text file, forget about std.textio.

VHDL can be used for reading and writing binary files; a little
searching online will show examples to get you started.

Then you need to understand the file format of .jpg files, and write a
parser for that format. Again, there will be documentation available. If
you are lucky, you may not need to support all variations of the format;
e.g. if you only need to read a few images for demonstration.

If you are more comfortable programming in another language you may want
to test your understanding of the JPG format by writing a JPG image
decoder in that other language first, and using it as the basis for your
VHDL design.

Alternatively, there are much simpler file formats than .jpg. For
example, .bmp images would be much easier to read and write, if the
image processing is the important part of your project rather than the
JPEG decoding.

Also be aware that binary file I/O in VHDL is not guaranteed to be
portable between simulators. In Modelsim it just works as you would
expect (and you can easily read and write standard file formats).
However Xilinx ISE Simulator has its own file format. It can read files
it has written, but they are not in the same format as any other files.
To read a JPG file in this simulator you would need to convert it into
ISIM's file format (which has an eight byte header, and opposite
endian-ness to the host system). Good luck getting documentation on this
format from Xilinx (I've had a Webcase open for 5 weeks so far)
Other simulators may be different again.

- Brian

actually i want to implement my algorithms on virtex 5...so.....for
that..what to do.....what changes required in vhdl
programs.....because as i know...architecture of virtex 5 is little
bit different.....than others FPGA....

i have another problem.............i have to implement 8 point FFT on
virtex 5.......i have complete software part but problem coming in
implementation part on virtex 5....not getin how to assign proper pin
number to make UCF file...how to give inputs through hex editor........
.



Relevant Pages

  • Re: how to read jpg file using VHDL
    ... Since a JPG image is not a text file, ... parser for that format. ... VHDL design. ... Other simulators may be different again. ...
    (comp.lang.vhdl)
  • Re: Best format question
    ... I have a liffle Fuji FinePix A340 that only saves in JPG. ... Recently I discovered that this format is prone to ... my camera only produces JPGs. ... The other thing that has occured to me is the fact that I should spend more time before taking the pic, like in the old film days, rather than rely so much on post shoot editing. ...
    (rec.photo.digital)
  • Re: Best format question
    ... Recently I discovered that this format is prone to progressive quality loss over successive saves. ... Trying to research this issue I came to the conclusion that TIF might be better for storage. ... So will it help if I get the JPG images off the camera and immediately convert them to TIF before doing anything else with them? ...
    (rec.photo.digital)
  • Re: Scanning in family records?
    ... I use PDF and JPG for my documents. ... and JPG is a basic graphics format that will probably ... reduces the loss to acceptable levels. ...
    (soc.genealogy.methods)
  • Re: Best format question
    ... On Sep 18, 4:03 pm, Peter in New Zealand ... I have a liffle Fuji FinePix A340 that only saves in JPG. ... Recently I discovered that this format is prone to ...
    (rec.photo.digital)