Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Get image from frame

Altera_Forum
Honored Contributor II
1,006 Views

I am working on a project and need to process image frames acquainted before it goes to display. From the VIP Camera example, I found this: 

 

display = alt_video_display_only_frame_init(// ALT_VIDEO_DISPLAY_SGDMA_NAME, // char* sgdma_name 

FRAME_BUF_W, // int width 

FRAME_BUF_H, // int height 

ALT_VIDEO_DISPLAY_COLOR_DEPTH, // int color_depth 

SDRAM_BASE + 0x00800000, // int buffer_location 

1 ); // int num_buffers 

 

 

I wish to process the image obtained in 3D arrays(R,G,B ) but I have difficulty extracting the values from "display" and also how to put back the processed image into "display". Can someone help to guide me? I am quite new in NIOS II, is there any documentation or guide on this alt_video_display library? 

 

Thank You
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
279 Views

Check: http://www.altera.com/literature/an/an527.pdf (http://www.altera.com/literature/an/an527.pdf

 

All of the functions (as far as I can tell) are listed there as well as descriptions for each function.
0 Kudos
Altera_Forum
Honored Contributor II
279 Views

 

--- Quote Start ---  

Check: http://www.altera.com/literature/an/an527.pdf (http://www.altera.com/literature/an/an527.pdf

 

All of the functions (as far as I can tell) are listed there as well as descriptions for each function. 

--- Quote End ---  

 

 

Thank You for the link. It was certainly helpful but I still quite confuse with this function: 

 

======== 

int alt_video_display_buffer_is_available(alt_video_display* display); 

This function returns the next free frame buffer available for display. The 

function returns a condition code of 0 if an empty buffer is found; any 

other return value indicates failure. The function accepts the following 

parameter: 

■ display: This variable is a pointer to a data structure that keeps 

track of all of the frame buffer information, including the start 

addresses for all of the frame buffers. 

======== 

 

It says that it return 0 or other number indicates failure. Then, my question is, where is the frame I want goes? I need the frame to do analysis before display. Thank you.
0 Kudos
Reply