Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Video Processing using Xilinx FPGA and MATLAB...how? (complete beginner)

Status
Not open for further replies.

Goldseemon

Newbie level 3
Joined
Jul 17, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,330
Hello,

I'm totally new in FPGA field, so i hope i can get as much possible guidance here if possible...Thank you everyone for your time and support.

I am currently trying to process video using FPGA Board. It is just a simple mapping of pixels. my process will be something like:

Export a continuous video (taken using webcam), into FPGA, then FPGA will perform mapping of the video, such as, the pixel at coordinate say, (1,1), will be mapped into a new image at coordinate say, (99,1) for example. After finished mapping the pixels at all the coordinates, I will then import the new video back into computer.

( I already had all their corresponding coordinates to be mapped, and the new coordinate of the pixels..)

Can anyone guide me as to how can i do it using matlab and Xilinx ISE Project Navigator? (Or any recommended software?). How should i import the image into FPGA board? Using simulink / system generator? If so, how should i setup the connection between my board and my pc? And how can i import the image into the board after setting up the connections? Matlab code? Verilog? Or..? or i need some software to run it to establish the connections? After exporting the image into FPGA board, how can i process it? And How should the image be exported back to PC?

Sorry for all these questions, but i can't seem to find a proper detailed explanations on all these... The more i find, the more confused i get.

I hope someone out there is able to help me at least, on how or where to start...

Thank you very much.


For your information, i am using Xilinx Spartan-6 LX150T Development Kit.....

Regards,
Goldseemon
 

Hi Goklseemon,

If you wants to send the video frames in to the fpga board, there are many options are there. Some ar suggesting below :

1, If you are using a itu or web cams, and you wants to send the video stream directly in to the fpga, then the fpga board must have the itu/webcam connector , and in your fpga design you should receive the video input data and you should convert it in to appropriate pixel format. For example if you have itu656 input then your fpga board should contais an itu connector, then the output of the itu stream which is an 8bit parallel data bus with a clock, is connected to your fpga design and convert it in to appropriate 8/16/24 BPP pixel data.

2, if you have a VGA connector and if you wants to fed the vga data in tot the fpga board you should have a vga connector in your board and then a vga(analog) to digital rgb data chip which will give rgb data and hsync, vsync, datavalid, clock, etc., then the fpga design should received the data and then convert the rgb to 8/16/24 bpp format or any other format you need.

3, If you have any video in your computer, then you can deirectly fed it in to your fpga by using USB interface and all.
 

This is not going to be a simple task for a complete beginner. You will need to learn several things:

1. How to manipulate video theoretically (using matlab)
2. How to write HDL for an FPGA
3. How to take your Matlab algorithm and convert it to HDL.

Each of these steps can take a while to understand and actually get working. I suggest you start with number one and then when thats working, move on to 2 and then 3.

If your camera is plugged into the PC, it is actually a much more complicated task than if the video is plugged into the FPGA directly (via an ADC, or direct digital for something like HDMI).
 

Hi imbichie,

thanks for the information. How about if there are several webcams, say, 8, which are used at different area, then these webcams are connected via network, and will be access by only one computer. (Meaning, these 8 webcams are placed at separate areas, then we will use 1 main computer to view these 8 videos). And this main computer will be connected to fpga board, and fpga board will retrieve 8 of these videos, and process them at the same time... Is it possible?
For your option number 3, Xilinx has something called "Platform Cable USB-II G". Some sort of connector from pc to FPGA board. I assume some programming in VHDL is required to fed the video into fpga board, is it true? If so, would you mind guiding me as to how to fed the video into the fpga board..? Do we need to design a circuit of logic gates etc? Thanks alot.

Best regards,
Goldseemon

- - - Updated - - -

Hi TrickyDicky,

Thank you for your reply.
I've actually managed to manipulate the video using matlab codes. (in single pc with a single webcam connected to it directly). I have not tried on multiple webcams connected to a network though, but i believe that wouldn't differ much from the current one. However, for the second part you mentioned, writing HDL for an FPGA... I got confused how to actually build or compile the HDL code into Xilinx FPGA board. I tried using their "ISE Design Suite" software, opening up the "Project Navigator" to write VHDL codes, and to synthesize them into the board, but they requires things like pin number, clock rate, etc. I don't know what pin should i use or which RAM/ROM to use it, or how to use them... Any guidance is very much appreciated.


Best regards,
Goldseemon
 

You will need to learn about FPGA design. Each signal (ie each bit of a signal) will need to be connected to a pin. Each device has anywhere from a couple of hundred IOs to just over a thousand. So IO selection is up to you as it will depened on what devices are connected to which IOs on your board.

I suggest reading the user manual for the product you have.
 

I see.. Thanks for your reply.

So the idea behind it is like, i create a design my own, then i determine which input to be fed into which port etc, and which pin produces the output?
Does the image processing goes the same way? As in, say, pixel at this coordinate (1,1) is fed into..say, pin 10, then this pin 10 will gives an output at say, pin 11, then this output at pin 11 will be fed onto coordinate (10,1) at another image, something like this ? Or do you mean like, its possible to fed in an image of size m x n into pin 10, then this pic or component will do the mapping, as in pixel at coordinate (1,1) put at (10,1) etc, then output at pin 11? so we will just retrieve the processed image on pin 11 in our pc?

I'll try study the user manual again.. hopefully can understand better now.. Thanks alot for your help.

Regards,
Goldseemon
 

Hi imbichie,

thanks for the information. How about if there are several webcams, say, 8, which are used at different area, then these webcams are connected via network, and will be access by only one computer. (Meaning, these 8 webcams are placed at separate areas, then we will use 1 main computer to view these 8 videos). And this main computer will be connected to fpga board, and fpga board will retrieve 8 of these videos, and process them at the same time... Is it possible?
For your option number 3, Xilinx has something called "Platform Cable USB-II G". Some sort of connector from pc to FPGA board. I assume some programming in VHDL is required to fed the video into fpga board, is it true? If so, would you mind guiding me as to how to fed the video into the fpga board..? Do we need to design a circuit of logic gates etc? Thanks alot.

Best regards,
Goldseemon

Hi Goldseemon,
If there are several webcams and all, you can manage all of them simultaneously, its your choice to process only a single video frame by choosing the required one via using a mux, or you can use to process the whole video frames. Then to connecting the video output to a computer can be done by using a USB acces from board to fpga.

Then for accessing USB you need a USB connector in your board with USB acces design module in your FPGA design too.. and its relaated chips and all, for example cypress USB chip etc..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top