Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

Quartus - Need Helllppp BADLY, counters and other logic

Hi guys,

I am a bit of a newbie to programming in general and am doing a project for school. I am using Quartus and I have a DE2 board and a terasic camera which I am using to capture a video stream and do image processing on it (simple colour segmentation).

Now I need to feed these filtered pixels into Nios for further manipulations so I have to reduce the resolution of the image otherwise Nios has memory issues.

What I need to do is only sample every 20th pixel. I have the x and y coordinates of the pixels. So I thought I would do this in schematic capture and have a modulus counter counting up til 20 for x and y, and only taking that pixel... how would I do this? any clue?

My resolution is 640x480 so my aim is to reduce this to 32x24 because that would be a much smaller array to feed into Nios.

Any help would be highly appreciated because this is very urgent.

Thankssss

Dani

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Are you sure this is the way you want to down sample your image.

    I can't imagine you will get a very good results.

    A better way (More complex too I am affraid) Would be to perform some kind of filtering to determine the average the value of pixels in each 20x20 square.

    If you continue with your scheme then you will need counters to count horizontal pixels (Reset from the line sync pulse) and couners to count the vertical pixels (Reset from the frame sync pulse)

    You need to read up on VHDL (or verilog) design practices. Counters are a basic component of logic design and would should be able to find loads of info on the web.

    Rgds