LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Binary Morphoogy in Image Portions

Hallo,
I have the following question in which I would like to hear your opinions.
Is it possible to perform morphology (erode-dilate)in portions of a binary image and then compose them in a new image with the same size as the original binary one?
Will the results be the same as if the morphology (erode-dilate)would have implemented only once in the whole binary image?
Any help?
Thank you

Achille
0 Kudos
Message 1 of 14
(4,212 Views)
Hi Achille,

In Vision Assistant you will be unable to select a portion of the image (known as a ROI or Region of Interest) to perform the morphology on solely that part of the image.  Either way when you save the image again it will be the same size as the original.

Which versions of LabVIEW / Vision Assistant do you have?
Rishi L
National Instruments
Applications Engineer
0 Kudos
Message 2 of 14
(4,186 Views)
Dear Rishi,
Thank you for your answer. I am using Labview 8.2.1 and the vision development 8.0 or 8.2.
I am trying to create my own application using the vision development module and not the vision assistant.
Since I have a linescan camera what exactly i need to do is to take each time a group of 15 lines for example and apply binary morphology.
Then the result of each binary morphology of the groups of 15 line to compose on a larger image in which I have to take some desicions.
The idea is the following.
I have a linescan camera on a conveyor belt.

1) take a group of 15 lines and apply binary morphology
2) Repeat step 1 for 10 times.
3) Having an image of heigth 10x15 ( the other direction is standard 512)find some objects.
4) take a new group of 15 lines and apply morphology
5) delete the first 15 lines of step 1 and add the new ones
6) Find new objects
7) repeat step 4.
I don't know if you can understand but I would like to have a "moving window" which each time will be moved by 15 lines in which new 15 lines I will have to apply binary morphology and then merge with the results of the binary morphology applied on previous steps.

Can you please help me?

Regards,
Achille
0 Kudos
Message 3 of 14
(4,164 Views)
Hi Achille,

If I understand correctly, you are grabbing 15 lines from your camera (to make up a field), and you are performing binary morphology on that field.  Would a queue be appropriate to show you the last 10 images (post-processed)?
If you are unfamiliar with how queues work, open up the Example Finder (Help >> Find Examples), and search for Queues.  The first example should be "Queue Basics.vi". 

Are you hoping of combining the last 10 images, into one 'super-image', then perform additional processing on it?
Would an array of the last 10 images suffice, or do you want them all saved under one image?

Let me know!


Rishi L
National Instruments
Applications Engineer
0 Kudos
Message 4 of 14
(4,136 Views)
Dear Rishi,
Thank you for your answer and sorry for the late of my response.
I have attached a file for you with schematic explanation of what I am trying to do.
As you can see I have an initial binary image (1st step binary image)image in which I have to apply morphology (erode dilate).
After applying morphology I want to remove the top part of the image and insert a new part of the same size in the bottom of the image so as the total heigth of the image remains constant.
The result is to have the 2nd step binary image, as you can see, in which I have also to apply again the same morphology process.
After the morphology by removing again the top part and inserted a part in the bottom the 3rd step binary image is created.
Each time the part that is inserted in the image is "new" meaning that is coming from the camera.
As can I uderstand there are two solutions:

Solution 1
Apply morphology in each image separately (1st, 2nd, 3rd step image). The problem is that is really time consuming for my application.

Solution2
In images 1 and 2,(the same also in images 2 and 3)there is large area which is the same in both. The only difference between two consecutive images is only the incoming part each time. So if I apply morphology only in the new incoming part and then combine it with the morphlogy of the rest of the image which already exists it will be much much less time consuming.

Process the image 3 according to the solution1 and Image 3 according to the solution 2 the final result will be the same?

In the case that the incoming part in each image contains also part of an object (in the attach file the incoming part is only background). Applying solution 2 the object maybe will be in touch with borders of the incoming part(top bottom). But if I insert it first to the image and apply solution 1 then it will be a part of a larger image and at least at the top the new incomig object will not be in touch with any border.
Will the result be the same?
Is any possible way of doing that? As you can understand my main concern is to reduce the process time in each loop which is a really critical task for me.

Thank you in advance and hope to hear some news for you soon.

If tou need more deatails plase message me.
0 Kudos
Message 5 of 14
(4,105 Views)
Hi achille,

It seems your attachment did not come through. Could you re-post it?

Best Regards,

~Nate
0 Kudos
Message 6 of 14
(4,077 Views)
Here is the attachement file again. I hope this time you can see it normally.
Thank you
Download All
0 Kudos
Message 7 of 14
(4,063 Views)
Hi achille,

Sorry, I still am not able to view the images Smiley Sad

~Nate
0 Kudos
Message 8 of 14
(4,028 Views)

Nate,

I can't see the files either when I try to open them in IE.  But if I save them to the desktop and open the files from there, I can see them.  Not in IE, not in Kodak Easyshare.  But in Paint, MS picture viewer, MS photo editor, and ACDSee.  But it looks different in ACDSee.

Achille, what program did you use to create the image?  There must be something odd about it that doesn't create a jpeg to specification.

0 Kudos
Message 9 of 14
(4,019 Views)
Sorry for the problem with the picture. I did it with adobe illustrator.
I was able to open them through the "Paint" of windows.
I have opened it again and saved as a png file. I hope this time things are better.
Thank you
0 Kudos
Message 10 of 14
(4,010 Views)