cvg / DeepLSD

Implementation of the paper "DeepLSD: Line Segment Detection and Refinement with Deep Image Gradients"
MIT License
486 stars 62 forks source link

Angle Field Visualization Code #4

Closed ibaiGorordo closed 1 year ago

ibaiGorordo commented 1 year ago

Hi,

How can I get the angle field visualization to look similar to the bottom left image in your README?

I have tried using get_flow_vis() by passing out['df'] and out['line_level'] as inputs, but I get the following image.

flow_img

I understand that the lines and points require additional code, but the flow part also doesn't look similar to the README, should I use a different code? Or, is line_level, not the correct variable?

Thanks!

rpautrat commented 1 year ago

Hi, line_level should be the right variable. What command did you use exactly to plot it? If I plot get_flow_vis(out['df'][0].cpu().numpy(), out['line_level'][0].cpu().numpy()), I get the following image: angle

ibaiGorordo commented 1 year ago

Thanks for the quick reply. I realize now that the only difference was that I was plotting the image in OpenCV, so I had to set convert_to_bgr=True in flow_vis.flow_to_color(). Then, I got the same output.

Thanks!