UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie ka367
Newbie
7,912 Views
Registered: ‎12-01-2014

Houghlines transform.- Generated HLS stream has leftover data warnings , that casue problem in RTL hanging

Hello,

We are trying to implement hough transfom and mark lanes on a output image. The problem we face here is, we are able to generate outputs, but after the compilation we get the below warning.

 

WARNING: Hls::stream 'hls::stream<unsigned char>.30' contains leftover data, which may result in RTL simulation hanging.
WARNING: Hls::stream 'hls::stream<unsigned char>.29' contains leftover data, which may result in RTL simulation hanging.

 

As per our understanding we think I error might be because the canny_edges2 and canny_edges5 stream are not comsumed into another functions/outputs. Any help on how to solve this problem is appreciated. Please note we have used all necessary header files.

 

Below is the code from streaming input image to output image stream.

#pragma HLS dataflow
// AXI to RGB_IMAGE stream
hls::AXIvideo2Mat( input, src );
hls::Duplicate(src, f1, f2);
// Grayscaling
hls::CvtColor<HLS_RGB2GRAY>( f1, src_bw );
// Gaussian Blur Noise Reduction
hls::GaussianBlur<5,5>( src_bw, src_blur, 1.4, 1.4 );
// Duplicate the streams
hls::Duplicate( src_blur, src1, src2 );
// Calculate gradients in x and y direction using Sobel filter
hls::Sobel<1,0,3>( src1, sobel_gx );
hls::Sobel<0,1,3>( src2, sobel_gy );
// Calculate gradient magnitude and direction
gradient_decomposition( sobel_gx, sobel_gy, grad_gd );
// Perform non-maximum suppression for edge thinning
nonmax_suppression( grad_gd, suppressed );
// Perform hysteresis thresholding for edge tracing
hysteresis( suppressed, canny_edges, 50, 140 );

hls::Duplicate( canny_edges, canny_edges1, canny_edges2); //making multiple copies of canny edges for future purposes

hls::Polar_< ap_fixed<16,3>, ap_fixed<12,12> > lines[500]; //Hough transform
hls::HoughLines2<1, 5>(canny_edges1, lines, 500);


hls::Scalar<3, unsigned char>pixelh; //pixel to add to hough image
hls::Scalar<3, unsigned char>pixela; //pixel to read image

for(pxtype y=0;y<480;y++)
{
for(pxtype x=0;x<640;x++)
{

canny_edges2 >> pixela;

p=0;
if(pixela.val[0] != 0)
{
for(int i=0;i<500;i++)
{
cordic(lines[i].angle, s, c);
y0 = (lines[i].rho - x*c) /s;
d = y-y0;
if(( d<=0) && ( y > 240))
//if((d <= 500) && (y > 540 && (x <350 || x> 1300)))
p = 1;
}
if(p==1)
{
pixelh.val[0] = 255;

}
else
{
pixelh.val[0] = 0;
}
}
else
{
pixelh.val[0] = 0;
}
canny_edges5 << pixelh;
}
}

hls::Scalar<3, unsigned char> color(0,0,255);
hls::PaintMask(f2,canny_edges5,f3,color);
// RGB_IMAGE to AXI stream

hls::Mat2AXIvideo(f3, output );

0 Kudos
4 Replies
Observer deepeshprakash
Observer
7,882 Views
Registered: ‎11-02-2014

Re: Houghlines transform.- Generated HLS stream has leftover data warnings , that casue problem in RTL hanging

i am working on this project can we share our ideas .........however i am using xilinx system generator.....for this project.

i have send you my mail id as private message plz be free to mail me

 

0 Kudos
Visitor juntawu
Visitor
5,373 Views
Registered: ‎04-07-2016

Re: Houghlines transform.- Generated HLS stream has leftover data warnings , that casue problem in RTL hanging

Hello, ka367,Have you solved the problem? I come across the same problem now. There are a series of warnings when i do the C Simulation. I cant figure out why.
0 Kudos
Visitor ererge
Visitor
4,687 Views
Registered: ‎06-20-2016

Re: Houghlines transform.- Generated HLS stream has leftover data warnings , that casue problem in RTL hanging

Hey, is there any working code to plot the calculated hough2 lines into an hls image?

 

This is very urgent, got stuck now during my master thesis :(

 

Please contact me!

 

Thanks.

0 Kudos
Visitor 920125lh
Visitor
474 Views
Registered: ‎11-21-2017

Re: Houghlines transform.- Generated HLS stream has leftover data warnings , that casue problem in RTL hanging

hi,I am studying hls and want implement canny using hls ,could you send me your code about this for reference.Thank you very much!

0 Kudos