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

bounding box-image processing

Altera_Forum
Honored Contributor II
930 Views

I am doing a project which is image processing. The image ia captured using TRDB_D5M. I need to bound an red color object using bounding box. The VGA controller from the CD does not show oCurrentX and oCurrentY. How do i control the iPosX and iPosY of the pixel. Which module should i connect to if there is not from VGA controller? 

 

This is the sameple code which i find in journal.. 

 

Pixel Detection by Threshold 

// value > Threshold => pixel belongs to BLOB 

if (( iVGA_R + iVGA_G + iVGA_B ) > threshold ) 

begin 

// check if pixel belongs to current frame 

if( currentFrame == countFrames ) 

begin 

// compute coordinates for bounding box 

if( iPosX < minX ) minX = iPosX ; 

if( iPosX > maxX ) maxX = iPosX ; 

if( iPosY < minY ) minY = iPosY ; 

if( iPosY > maxY ) maxY = iPosY ; 

end 

end // end threshold 

// compute difference between minX , minY , maxX , maxY 

diffX = (( maxX - minX ) > >1); //>>1 == division by 2 

diffY = (( maxY - minY ) > >1); //>>1 == division by 2 

// send BLOB attributs to output , if new frame starts 

if( currentFrame < countFrames ) 

begin 

othrPosX = ( minX + diffX ); 

othrPosY = ( minY + diffY ); 

currentFrame = countFrames ; 

maxX = 0; 

minX = 1000; 

maxY = 0; 

minY = 1000; 

end 

.
0 Kudos
0 Replies
Reply