Hi - I am using the SOLD2 model for line detection and matching based on the kornia tutorial here.. I asked this on the kornia github, but it seems like this is a better avenue for questions given your development of the model.
I would like to retrieve the lines on outputs['line_heatmap] that correspond with the final detected / matched line segments. For example: If outputs['line_segments'] returns a line segment with endpoints [(y1, x1), (y2, x2)], how can I find the lines on outputs['line_heatmap] that correspond with that line segment?
My understanding of the returned information from outputs is:
outputs['line_heatmap] may include detected curves/edges that are not necessarily completely straight line segments.
outputs['line_heatmap] values are used in conjunction with the outputs['junction_heatmap] values to determine potential line segments.
outputs['line_segments] are straight line segments parameterized by two endpoints. These straight line segments may not reflect the lines detected in line_heatmap
So given two reported endpoints of a straight line segment from outputs['line_segments'], can I retrieve the (potentially not straight) line from outputs['line_heatmap'] that corresponds to that line segment?
My first thought is simply to use outputs['line_segments'] to find a straight line segment. Then search in a vicinity of the endpoints of the straight line segment as well as in a region along that straight line segment for the pixels in outputs['line_heatmap'] that have the highest intensity. My assumptions are:
- The two reported endpoints of a line segment from
outputs['line_segments'] will also be on a line in the line_heatmap (i.e. the coordinates of the endpoints will have a high pixel intensity in the heatmap).
- There will be lines on the
'line_heatmap' that correspond with every reported line segment in outputs['line_segments'].
- The highest intensity pixels in
'line_heatmap' that are close to the endpoints from 'line_segments' and close to the straight line parameterized by 'line_segments' are used to determine the final output line segment.
Ideally, for a single reported line segment in outputs['line_segments'], I would like to return a list of pixel coordinates [(x1, y1), (x2, y2), (x3, y3),...,(xn, yn)] that represents the pixels on the detected line in outputs['line_heatmap'] that is associated with the that single reported line segment.
Is there a way to do this using kornia? Thanks!
Hi - I am using the SOLD2 model for line detection and matching based on the
korniatutorial here.. I asked this on thekorniagithub, but it seems like this is a better avenue for questions given your development of the model.I would like to retrieve the lines on
outputs['line_heatmap]that correspond with the final detected / matched line segments. For example: Ifoutputs['line_segments']returns a line segment with endpoints[(y1, x1), (y2, x2)], how can I find the lines onoutputs['line_heatmap]that correspond with that line segment?My understanding of the returned information from
outputsis:outputs['line_heatmap]may include detected curves/edges that are not necessarily completely straight line segments.outputs['line_heatmap]values are used in conjunction with theoutputs['junction_heatmap]values to determine potential line segments.outputs['line_segments]are straight line segments parameterized by two endpoints. These straight line segments may not reflect the lines detected inline_heatmapSo given two reported endpoints of a straight line segment from
outputs['line_segments'], can I retrieve the (potentially not straight) line fromoutputs['line_heatmap']that corresponds to that line segment?My first thought is simply to use
outputs['line_segments']to find a straight line segment. Then search in a vicinity of the endpoints of the straight line segment as well as in a region along that straight line segment for the pixels inoutputs['line_heatmap']that have the highest intensity. My assumptions are:outputs['line_segments']will also be on a line in theline_heatmap(i.e. the coordinates of the endpoints will have a high pixel intensity in the heatmap).'line_heatmap'that correspond with every reported line segment inoutputs['line_segments'].'line_heatmap'that are close to the endpoints from'line_segments'and close to the straight line parameterized by'line_segments'are used to determine the final output line segment.Ideally, for a single reported line segment in
outputs['line_segments'], I would like to return a list of pixel coordinates[(x1, y1), (x2, y2), (x3, y3),...,(xn, yn)]that represents the pixels on the detected line inoutputs['line_heatmap']that is associated with the that single reported line segment.Is there a way to do this using kornia? Thanks!