LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dilatation and Erosion no binary picture

Solved!
Go to solution

Hi everybody 🙂

 

So i'm working on a image processing program and i have some issues with it !

 

So i'm using Labview 2011 (evaluation) but i don't have IMAQ or the Vision kit.

 

I'm able to convert a picture (going from the picture to 2D array) from color to binary (color to greyscale and greyscale to binary) and now i have to create a "dilatation" and a "erosion" function, but i'm quite stuck, and i don't find the way to make it work.

Hope you can help me! Thanks!

 

0 Kudos
Message 1 of 18
(4,121 Views)

Are looking for help in developing your own function, or looking for a function in LabVIEW?

 

If you are looking for LabVIEW to have this capability, yours will not.  You will need some kind of vision software, most likely the Vision Development Module.

 

You can download the Vision Development Module and use an evaluation version of that as well. 

Chris
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 2 of 18
(4,118 Views)

I'd like to make my own function.

I have found a way to look if a pixel is black or white and then if he's black, to change all the pixels around also in black, but then, i'm stuck cause i'd like to be able to apply those changements in the initial picture.

Am I clear or do you need maybe more information ?

0 Kudos
Message 3 of 18
(4,115 Views)
Solution
Accepted by topic author VGans

Hello VGans,

 

Can you post some example code that illustrates what you're trying to do?

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 4 of 18
(4,095 Views)

Hi everybody 🙂

So I found a way to do the erosion, and also the dilatation but unfortunately the dilatation is not quite perfect !
But here are my codes  🙂

Download All
0 Kudos
Message 5 of 18
(4,090 Views)

Hello VGans,

 

Is it possible to post the VI's instead of the pdfs?

This is easier to make changes to 😉

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 6 of 18
(4,079 Views)

There you go 🙂

Download All
0 Kudos
Message 7 of 18
(4,062 Views)

Hello VGans,

 

Apparently some subVI's are missing:

Binary.vi

Grayscale.vi

 

Can you also tell me what the perfect result should look like and what's missing in this case?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 8 of 18
(4,047 Views)

Sorry for the subvis 🙂

 

We always work on a binary picture

So for erosion is the process :

We analyse the picture by successively placing the origin of a structuring element (a NxN matrix) to all possible pixel locations, the output is black if the structuring element is completely contained in the image (all the pixels are black) and white otherwise. 

 

For the dilatation, it's the opposite : if at least one pixel is black in the surface covered by the structuring element, then the output is black. And the output is white only if all the pixels are white.

I put a pdf in attachement if you don't get what i'm saying (I might not be clear 🙂 ). I got all the information from that document 🙂

So you can test with the vi's.
I think erosion works perfectly but dilatation is a bit weird. There is a black line at the bottom and left sides that appears, and I don't know why.

Okay! So you can find here the vi's you need to check out the erosion and dilatation, the document about image processing, and my whole program (the one i was supposed to create for my exam 😉 )

 

And thanks for the help 🙂 Even if I already took my exam, i'm still interested in finding the right way to do it 😉

0 Kudos
Message 9 of 18
(4,038 Views)

Too heavy to put everything together 😉

Message 10 of 18
(4,037 Views)