Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17252 Discussions

Simple stuff! bit selection and counters! HELP!

Altera_Forum
Honored Contributor II
1,128 Views

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
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
456 Views

 

--- Quote Start ---  

Hi guys, 

 

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.  

 

--- Quote End ---  

 

 

Before actually feeding this data to the cpu, you can simply store it on an on-board memory. Later, you can sample the data from the memory either directly in NIOS or in your HDL design (from where you can feed it to NIOS).
0 Kudos
Altera_Forum
Honored Contributor II
456 Views

[slightly off topic] The standard approach in reducing the image size - without losing information - is to low-pass filter the image first, and then downsample. You could be doing that, you just didn't mention it.

0 Kudos
Reply