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

Instantiation of 2D median filter

Hello everyone 

 

I am trying to instantiate the 2D median filter from couple of days. I am new in this field. I have made a sopc with IP core's - clock, clock video input, scaler and 2d Median filter. I am using the simple camera example from altera that comes with CD.  

 

I can see the frame count in the 7-segments that implies camera is running. And so, the filter should be working too. But I don't see any out on LCD display panel. I am confused is it because of 1) fault instantiation of Median filter 2) or because of clock 3) clock video input 

 

Here is the part of the code: 

 

 

wire [23:0] LCD_DATA_med;  

wire [7:0] lcd_r_med; 

wire [7:0] lcd_g_med; 

wire [7:0] lcd_b_med;  

 

assign lcd_r_med = LCD_DATA_med[23:16]; 

assign lcd_g_med = LCD_DATA_med[15:8]; 

assign lcd_b_med = LCD_DATA_med[7:0];  

 

// RGB classification by taking data from SDRAM 

 

wire [9:0] wVGA_R = Read_DATA2[9:0]; 

wire [9:0] wVGA_G = {Read_DATA1[14:10],Read_DATA2[14:10]}; 

wire [9:0] wVGA_B = Read_DATA1[9:0];  

 

 

sdram_pll u6 ( 

.inclk0(CLOCK3_50), 

.c0(sdram_ctrl_clk), 

.c1(DRAM_CLK), 

.c2(CAMERA_XCLKIN), // cmos sensor main clock input,25M 

.c3(cti0_clk) // cmos sensor lcd pix clock,33M 

);  

 

median u0 ( 

//camera-clock video input 

.alt_vip_cti_0_clocked_video_vid_clk (cti0_clk), // alt_vip_cti_0_clocked_video.vid_clk 

.alt_vip_cti_0_clocked_video_vid_data ({wVGA_R[9:2],wVGA_G[9:2],wVGA_B[9:2]}), //24 bit data from SDRAM  

.alt_vip_cti_0_clocked_video_vid_datavalid (rCCD_LVAL), // .vid_datavalid 

.alt_vip_cti_0_clocked_video_vid_locked (DLY_RST_3), // .vid_locked 

 

//clock 

.clk_clk (CLOCK_50), // clk.clk 

.reset_reset_n (DLY_RST_3),// reset.reset_n 

 

//2D Median: out  

.alt_vip_med_0_dout_ready (Read), // 'Read' from ltp_controller 

.alt_vip_med_0_dout_valid (med_dout_valid), // Not sure; just wrote a wire type variable 

.alt_vip_med_0_dout_data (LCD_DATA_med), // Median output data(8-bit) .data 

.alt_vip_med_0_dout_startofpacket (dout_startofpacket), //Not sure; just wrote a wire type variable //.startofpacket 

.alt_vip_med_0_dout_endofpacket (dout_endofpacket) //Not sure; just wrote a wire type variable //.endofpacket 

); 

 

 

//ltp controller: touch panel-display output 

 

ltp_controller u1 ( .iCLK(ltm_nclk), //LTP_CTRL_CLK 

.iRST_n(DLY_RST_2), 

 

.iREAD_DATA1({lcd_g_med[7:5], lcd_b_med}), 

.iREAD_DATA2({lcd_g_med[3:0], lcd_r_med}), 

 

.oREAD_SDRAM_EN(Read), 

// lcd side 

.oLCD_R(lcd_r), 

.oLCD_G(lcd_g), 

.oLCD_B(lcd_b), 

.oHD(lcd_hs), 

.oVD(lcd_vs), 

.oDEN() 

); 

 

If I use "wVGA_R, wVGA_R,wVGA_R" in 'ltp_controller' I can display the image on LCD panel. If use the median filter module than nothing shown on the display but the camra runs and frame count shown on 7-segments. I have also attached the screenshot of SOPC.  

 

Can any one please help me out from this problem..Please 

 

Thanks and regards 

Rupok
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
13 Views

Can anybody please help me? I am still not able to implement 2D median filter.. 

 

Thanks
Reply