DSPRelated.com
Forums

help on TMS320C6711 DSP Imaging Developer’s Kit (IDK)

Started by jayaroop g December 6, 2002
Hello,
We implemented a image segementation algorithm
using TMS320C6711 DSP Imaging Developers Kit (IDK) on
real time video.
The problem is: due to the complexity
(computations involved) of the algorithm, there is a
delay in the video,i.e., i am missing some frames.
I wanted to know how many frames i am missing. Can
anyone suggest me how to caluculate the number of
frames being missed.
Secondly, i am using some math functions like
sin and cos in my code as follows:

for(row=0; row<240; row++)
for(col=0; col<320; col++)
if (sobel[row][col] > 200)
for(k=0; k<360; k+ )
{
arg= (3.142*k)/(180.0);
x = (int)roundf(row + R*cos(arg));
y = (int)roundf(col + R*sin(arg));
if ((x>=0) && (x<240))
if ((y>=0) && (y<320))
circle_acc[x][y] +=1;
}

it is taking time to do the above computation which is
one of the reasons for losing the frames, may be
because i am using cos and sin functions. Can anyone
suggest me how i can optimize it or is there any way
to perform cos and sin functions using assembly
coding.

Thank you,
Jay =====
Gullapalli Jayaroop (SHAPE of VICTORY)
Mailing Address
700, Woodland Avenue, A308
Lexington,
kentucky-40508,
USA.
Home Phone: 859-323-9711




Precompute the 18 sin(arg) and cos(arg) values and store them in an array.

There are probably many other things that can be done as well.

Andrew

At 03:06 PM 12/5/2002 -0800, jayaroop g wrote:
>Hello,
> We implemented a image segementation algorithm
>using TMS320C6711 DSP Imaging Developers Kit (IDK) on
>real time video.
> The problem is: due to the complexity
>(computations involved) of the algorithm, there is a
>delay in the video,i.e., i am missing some frames.
>I wanted to know how many frames i am missing. Can
>anyone suggest me how to caluculate the number of
>frames being missed.
> Secondly, i am using some math functions like
>sin and cos in my code as follows:
>
>for(row=0; row<240; row++)
> for(col=0; col<320; col++)
> if (sobel[row][col] > 200)
> for(k=0; k<360; k+ )
> {
> arg= (3.142*k)/(180.0);
> x = (int)roundf(row + R*cos(arg));
> y = (int)roundf(col + R*sin(arg));
> if ((x>=0) && (x<240))
> if ((y>=0) && (y<320))
> circle_acc[x][y] +=1;
> }
>
>it is taking time to do the above computation which is
>one of the reasons for losing the frames, may be
>because i am using cos and sin functions. Can anyone
>suggest me how i can optimize it or is there any way
>to perform cos and sin functions using assembly
>coding.
>
>Thank you,
>Jay >=====
>Gullapalli Jayaroop (SHAPE of VICTORY)
>Mailing Address
>700, Woodland Avenue, A308
>Lexington,
>kentucky-40508,
>USA.
>Home Phone: 859-323-9711