LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get all straight edges in a rectangular ROI

Hi to all,

First of all thanks a lot for reading this post and being able to help.

 

I would like to find all edges find in a rectangular roi.

I have tried to use this example:

findEdges.png

 

 

The problem is that this VI "straigh edge detection" just find some of edges, not of all them. In the image this vi have found 3 lines, and I would like to detect 6 lines because there are 6 lines to detect in the rectangular roi.

 

Is there any way to do this?

 

Thanks a lot.

0 Kudos
Message 1 of 5
(2,929 Views)

@Alvaro.S wrote:

Hi to all,

First of all thanks a lot for reading this post and being able to help.

 

I would like to find all edges find in a rectangular roi.

I have tried to use this example:

findEdges.png

 

 

The problem is that this VI "straigh edge detection" just find some of edges, not of all them. In the image this vi have found 3 lines, and I would like to detect 6 lines because there are 6 lines to detect in the rectangular roi.

 

Is there any way to do this?

 

Thanks a lot.


Don't use same example code for your needs. First let you understand the sample codes and try it same way in NI Vision assistant tool. You've to draw rectangular roi entirely where need to find 6 line edges, adjust edge option, edge configuration. Check this url,

 

https://forums.ni.com/t5/Example-Program-Drafts/Edge-Detection-using-Vision-Development-Module-for-L...

0 Kudos
Message 2 of 5
(2,894 Views)

With Respect to particular Example you need to select Type as "Best Edge Projection" and select how many Number of Lines you need the you will get the Max best Edges in the Selected ROI wrt. your required Number of Lines.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 5
(2,892 Views)

Hi, thanks for your help.

 

If I use "Best edge projection" then tool find just 1 edge in 1 line, I would like to find all of edgest with step option. I mean, some cheking line in horizontal (it depends on step option) and then find all of edges that there are acroos these lines.

 

Thanks a lot. 

0 Kudos
Message 4 of 5
(2,884 Views)

I would encourage you to try out the algorithm in Vision Assistant first, to see which one works best for you. Open your image in Vision Assistant, then select the Adv. Straight Edge step located in the Machine Vision palette.

Select either the Best Hough Edge Rake, First or Best Edge Projection detection methods. Those are the ones that will allow you to detect multiple edges.

Draw your ROI, then uncheck the Suggest Value checkbox.

Select the Straight Edge Settings tab, then increase the Straight Edge Requested value to the number of edges you want to find.

Adjust other parameters if needed, based on the edge strength profile displayed.

When you're satisfied with the results, click OK, then Tools>>Create LabVIEW VI to create the code corresponding to this algorithm.

 

0 Kudos
Message 5 of 5
(2,875 Views)