LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with selfmade Hough Transform in formula node

Solved!
Go to solution

I forgot to again insert the code. Excuse le for that.

It's different and it has something of a transform but its not quite it

0 Kudos
Message 11 of 25
(1,987 Views)

Help, someone? 🙂

0 Kudos
Message 12 of 25
(1,966 Views)
hi Sailiman,

Sailiman wrote:

So if a pixel is not zero; 

 


where does this premise appear in your code? is this supposed to be a binary image?

 

If that's the case, I would suggest to  apply the threshold(s) before calculating the Hough Transform

 


Sailiman wrote:

Then for the voting process I increase the value of every pixel by 1.



the accumulator array is nothing else than a 2d histogram. "voting" means to "increment" a bin of this histogram.
Again, I can't figure out, where this is supposed to be in your code.
Maybe I'm reading it wrong...
Furthermore, I would calculate the Hough Transform with regards to the image center which is for example at  x0 = height/2 ; y0 = width/2
This is the result of my non-formula node based approach:
2013-12-04_hough.png
Regards,
Alex

 

0 Kudos
Message 13 of 25
(1,952 Views)

Hello Alex,

 

 

Before the Hough I apply some preprocessing like Canny Edge Detector, Thresholding, etc..

As you mentioned my voting process is completely wrong, now thanks to you I understand a bit more about the Accumulator.

 

As all other people suggested, I tried the non formula node approach but I still didn't manage to properly apply the hough transform.

My visual coding skills really sucks.

 

Can you show me your code please? I do not intent to use it, I just want to have a proper example of a modus operandi.

 

 

Sincerely yours,

0 Kudos
Message 14 of 25
(1,938 Views)

Here is my attempt with a Hough Transform with mostly blocks.

I'm just having trouble building the accumulator..

0 Kudos
Message 15 of 25
(1,932 Views)

I appreciate your block-based approach.

Here are my modifications:

 

hough.png

 

 

I've seen the idea for the accumulator in this thread: http://forums.ni.com/t5/LabVIEW/Create-fast-intenstiy-histogram-without-Vision-toolkit/m-p/1790558/h...

 

 

 

Regards,
Alex

 

Message 16 of 25
(1,919 Views)

Wow Labview never cease to surprise me, I've never heard of the fast placement structure before.

And what are the blocks which you connect Threshold Low and high to and the one you use to visualize the output? Is that a waveform Graph/Chart  I've also never see it before.

 

Thanks in advance Alex

0 Kudos
Message 17 of 25
(1,906 Views)
Solution
Accepted by topic author Sailiman

I'm glad to help you

 

At the end of this thread  from NI goes a bit into detail about the use of the in-placement structure in modern Labview

http://forums.ni.com/t5/LabVIEW/Please-explain-the-In-Place-Element-Structure-to-me/m-p/2432242#M749...

 

And what are the blocks which you connect Threshold Low and high to and the one you use to visualize the output?

That's the handy "In Range And Coerce.vi" (you can get this Information by putting your mouse cursor  on the particular block and press ctrl+h)

 

Is that a waveform Graph/Chart  I've also never see it before.

It's an intensity graph; I borrowed this idea from shown in this thread:

http://forums.ni.com/t5/LabVIEW/Overlay-plots-as-intensity-graph/m-p/211222#M119248

 

 

Moreover, you can drag+drop the snippet I posted in my last post directly into your Blockdiagram!

 

 

Regards,
Alex

 

Message 18 of 25
(1,889 Views)

Allright!

 

 

Yeah I know about the drag'ndrop feature but somehow it doesn't work. I just get the link on my labview.

But when I go on the official tutorials of NI then everything works fine.

 

After the exams I'm planning to make a blog about understanding the principles of Signal Processing and apply it in Labview in the hope to help other students/passsionates alike.

 

 

Cheers Alex

0 Kudos
Message 19 of 25
(1,878 Views)

Yeah I know about the drag'ndrop feature but somehow it doesn't work

Hmmm, the snippet seems to be compatible upward but not compatible downwards. For example, I was able to open snippets which I created with LabView 2011 in LabView 2013.

By the way, I also use the LabView 2013 f2 Patch.

 

I welcome your good intentions!

 

 

Regards,
Alex

 

0 Kudos
Message 20 of 25
(1,866 Views)