LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate a perpendicular line to a edge?

Hello together,

I want generate a perpendicular line to edge, which was found in a ROI.

Please see the attachement. The green line is the edge and the black line (manually entered with paint software) should be the perpendicular line and in the middle of the green line.

The problem is: the green line isn't horizontal.

Does someone have a idea or solution?

 

Thanks in advance

 

greetings zäpfle

 

LV2012

 

 

 

0 Kudos
Message 1 of 7
(3,712 Views)

The IMAQ Perpendicular Line vi is probably what you need to use :

 

acq.png


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 7
(3,706 Views)

Thanks

I have tied this VI. But without sucess.

I hope there is a other solution.

Please look to the attachment.

I have no idea, how can I find the important points.

I need the black linie.

Maybe You have a other idea?

 

Thanks in advance.

 

greetings

 

0 Kudos
Message 3 of 7
(3,696 Views)

Hello!

I just tried the same function in LabVIEW 2012 and it worked as expected.

Maybe you can try the code below on your system? (I saved the VI for LV version 8.0 to make sure you can open it)

Which version of LabVIEW are you using?

 

Greetings,

  Georg

0 Kudos
Message 4 of 7
(3,645 Views)

Hi Georg,

thanks for the code.  I have not had the time to try the code.

I use LV2012

 

greetings 

0 Kudos
Message 5 of 7
(3,638 Views)

Hello Georg,

 

the input: Point (SubVI IMAQ Perpendicular Line) should be determined automatically from the points of the red line.

 

Do you mean this is possible?

 

thanks in advance

 

greetings zäpfle

0 Kudos
Message 6 of 7
(3,630 Views)

 You implemented the function "Find Edges" already. This function has an output Array

called "Straight Edges" Within this Array there are all edges described by points.

By accessing the cluster within the array you can get the two points.

(see attached VI)

 

greetings, 

 Georg

0 Kudos
Message 7 of 7
(3,616 Views)