Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,183 Views

Capture image from video streaming by D5M camera

Hello, 

 

I am streaming video using D5M camera module. I want to store an image at a click of any key. 

But i am wondering, how to get the pixel location of streaming pixels.  

 

My Algo: 

I have a line buffer in the streaming path. 

I am storing 320x240 pixels after the key press (which represents my image), but we need to know the pixel location of each pixel in image, before displaying the clicked image on VGA. 

 

How do we do that? 

 

Please suggest
0 Kudos
8 Replies
Altera_Forum
Honored Contributor I
26 Views

Can anyone suggest on this issue.

Altera_Forum
Honored Contributor I
26 Views

The location of the pixel in RAM would be determined by your block which is storing the pixels. 

 

For example, if it is just storing each frame as a series of 76800 pixels, with each pixel being stored in a single 32-bit word, then the location of pixel (n) would be "base + (n) x 4". 

 

That is probably the simplest case, but there are many different possibilities, so you would have to examine your block which is performing the writing of the image. 

 

If you are still stuck, maybe post more details of your system?
Altera_Forum
Honored Contributor I
26 Views

My frame size is 320x240. 

I have Altera UP IP cores with streaming protocol. I inserted one line buffer(size 320)in between by building a custom component.  

So, every pixel passes through the line buffer. Now, when i want to click the image, I will be storing the next 320x240 pixels coming to my line buffer. 

 

Please correct me if I am wrong. 

 

Now, when I press the button to click, the current pixels in the line buffer could be any, throughout the image. So while storing the next pixels, I need to know the their locations so that while displaying them back, I can give it to appropriate location in pixel buffer memory.
Altera_Forum
Honored Contributor I
26 Views

Also I want to know, 

 

What is the best way if I want to process the streaming video using NIOS. 

How can i get the whole video frame from the streaming protocol to the NIOS core and after processing transmit it further in the streaming protocol. 

 

Please suggest.
Altera_Forum
Honored Contributor I
26 Views

Need Help. 

Please suggest
Altera_Forum
Honored Contributor I
26 Views

 

--- Quote Start ---  

My frame size is 320x240. 

I have Altera UP IP cores with streaming protocol. I inserted one line buffer(size 320)in between by building a custom component.  

So, every pixel passes through the line buffer. Now, when i want to click the image, I will be storing the next 320x240 pixels coming to my line buffer. 

 

Please correct me if I am wrong. 

 

Now, when I press the button to click, the current pixels in the line buffer could be any, throughout the image. So while storing the next pixels, I need to know the their locations so that while displaying them back, I can give it to appropriate location in pixel buffer memory. 

--- Quote End ---  

 

 

I am not familiar with "Altera UP IP cores with streaming protocol" so this is a general reply.  

 

You need to maintain some state and track the synchronization events. Your button press should signal a "frame save is pending" and then when the next frame sync comes around, you examine that flag and possibly start saving the frame: start writing at a given base address in RAM at offset 0, and keep incrementing the offset with every pixel that you write.
Altera_Forum
Honored Contributor I
26 Views

 

--- Quote Start ---  

What is the best way if I want to process the streaming video using NIOS. 

How can i get the whole video frame from the streaming protocol to the NIOS core and after processing transmit it further in the streaming protocol 

--- Quote End ---  

 

 

Again, I'm not familiar with the IP you are using so this is a general reply. 

 

You need to use or create an IP block which can receive the video frame and store it in RAM so the NIOS can then access it; and then perform the reverse operation of taking the result from RAM and supplying it to the stream. 

 

For example, if your system were using Avalon-ST you might be able to create a workable solution using the SGDMA in Stream-to-Memory and Memory-to-Stream modes.
Altera_Forum
Honored Contributor I
26 Views

Thank you Ted.  

I am searching for the sync signal which represents the start of my frame.