Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20704 Discussions

Best way to simulate a camera?

Altera_Forum
Honored Contributor II
1,102 Views

Hello to everyone, i have a question regarding video capturing. 

 

I am making a digital image processing system that is supposed to identify objetcs in a scene and extract relevant informations about them. 

 

My main goal is in the algorithm, i dont need to worry about how the video is going to be capture nor apply filters to that video. 

 

What would be the best way to take those images i am going to work in? 

 

I've thought of basically 3 different solutions: 

 

1: Connecting a camera to a fpga board with an A/D input and get the raw image. The problem is that there a alot of distortions in the image and i would need to apply filters to get a clean image. 

 

2: Connect the Camera to a computer and use a MATLAB/DSP Builder video block to send the images to my FPGA, generating files i guess? 

 

3: Use images in my ModelSim test bench 

 

I really would like some tips on how to do it, as i said my main goal is in the algorithm. I dont want to filter the images. Just use it for background subtraction. 

 

It's for a university project and i am still studying how to do it. Could someone give me a hand? 

 

Thanks a lot !
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
382 Views

Why is there distortion in your video image? raw data off the A/D should be the best quality you're going to get. Connecting the camera to your computer and matlab probably wont be any different, so you'll have to do the same filtering in matlab or the FPGA. 

 

As for solution 3 - this is fine if you are only ever going to simulate, plus it can be a very good way for testing individual algorithms/filters. But it does not overcome problems 1 and 2. 

 

Im guessing you're worried about phantom targets appearing?
0 Kudos
Altera_Forum
Honored Contributor II
382 Views

Yes, i only need to simulate. 

And yes i am worried about phantom targets, light variation and other stuff that can occur in "real" enviroments 

 

Thanks for the help
0 Kudos
Altera_Forum
Honored Contributor II
382 Views

if you're only worried about simulating, then (at least in VHDL) you can load bmp image direct into testbenches. 

 

let me know if you need help.
0 Kudos
Altera_Forum
Honored Contributor II
382 Views

To simulate a video i need to load a lot of images in sequence or can i load a video? 

 

THanks
0 Kudos
Altera_Forum
Honored Contributor II
382 Views

its up to you. If you dont care about the video, you can just load the data in. 

 

Its your testbench.
0 Kudos
Altera_Forum
Honored Contributor II
382 Views

Nice, guess i am going to do it since my goal is to evaluate the algorithm. 

 

Do you have any link or article that could help me with this task? Thanks
0 Kudos
Reply