04-22-2012 08:13 AM
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!
Solved! Go to Solution.
04-22-2012 09:00 AM
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.
04-22-2012 09:07 AM
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 ?
04-23-2012 05:43 AM
Hello VGans,
Can you post some example code that illustrates what you're trying to do?
04-23-2012 07:02 AM
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 🙂
04-23-2012 02:08 PM
Hello VGans,
Is it possible to post the VI's instead of the pdfs?
This is easier to make changes to 😉
04-24-2012 04:28 AM
There you go 🙂
04-25-2012 04:07 AM
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?
04-25-2012 09:27 AM
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 😉
04-25-2012 09:27 AM
Too heavy to put everything together 😉