LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Binary Morphoogy in Image Portions


Ah, thank you Achille, I can see the new images you posted in my browser. Thanks for the tip RavensFan, I didn't think to do that.

As to your question:

As I understand your application, the final result from your Solution1 & Solution2 processing will NOT be the same. Here is why:

Solution2: only the incoming 15 lines have the binary morphology operations applied to them (dilation, erosion). As these 15 lines "move up" in your image, the binary morphology operations you apply to the subsequent groups of incoming lines will not affect the rest of the image.

Solution1: the whole image will have the binary morphology operations applied to it each time a 15 line group is added to the bottom and the oldest group deleted from the top. If you process in this manner, by the time the 1st 15 line group reaches the top of your image, it will have had the binary morphology operations performed on it 10 successive times. In other words, your image would effectively be something like the following. Let's assume that you just perform an erosion for the sake of simplicity:
_________________________________________________
DELETE group
10th group:  has had 10 erosions
9th group:    has had 9 erosions
8th group:    has had 8 erosions
.
.
.
3rd group:    has had 3 erosions
2nd group:   has had 2 erosions
1st group:    has had 1 erosion

ADD group
__________________________________________________

If you do this it will distort your particles. I think you should go with solution 2, as this will apply the same processing to each group and then assemble them into your image where you can then detect particles and perform other analysis. This still leaves you with the problem, however, of the case that you mentioned where an object spans 2 or more 15 line groups. I've thought a little bit about this, but haven't come up with a good answer yet. One line of thinking was that you could determine the largest size (in terms of lines of your image) that you will expect for an object in your image. If the largest is say, 34 lines tall, then it would be completely represented in the image within 3 groups of 15. What if you waited to perform the binary morphology operations until these 3 groups reach positions 4, 5, & 6 and then perform the operation on only these three groups? This wouldn't work too well, however, because the same groups that contain the end of that object could contain the beginning of another object.  I think there are ways around this problem; I just haven't come up with a good one yet.

I hope the above comments help. Thanks for being patient in re-posting your example. Post back and we can continue the discussion. Perhaps someone else will have an insight on this problem. Ravens Fan?

~Nate

0 Kudos
Message 11 of 14
(860 Views)
Dear Nate,
Thank you very much for your reply. You have completely understand my problem. It is exactly as you described it.
Definately, the best way to proceed is according to solution 2. It will always process each group of 15lines only once and it will be very little time consuming.
You have mentioned of determining the largest size of the object in the image although as you have written this will not always work correctly as in the case that the same group of lines may contain the begginning of another object.
Even in this case there is no way of determining the largest size. The objects are really randoms both in shape and size.
The best way to proceed is to apply morphology in each group of 15 lines according to solution 2 but the critical point is to find a way of "connecting" the information of the morphology of one group of 15 lines to the morphology of the other group of 15 lines so as in the case that an object spans between to consecutive groups of lines the final result to be correct.
I am still searching. if something cames up I will let you know.
Thank you very much

Regards,
Achille
0 Kudos
Message 12 of 14
(851 Views)


N_Holmes wrote:


I hope the above comments help. Thanks for being patient in re-posting your example. Post back and we can continue the discussion. Perhaps someone else will have an insight on this problem. Ravens Fan?

~Nate



I'm sorry I won't be able to help.  I looked into the thread because the words of binary and images got my attention.  But then I realized it was well beyond my expertise.  I just decided to try to figure out what was wrong with the images and why they couldn't be viewed.Smiley Happy
0 Kudos
Message 13 of 14
(843 Views)
Hi Achille,

What if you preformed a "Close" function in a region of interest that includes the last line of the previously acquired 15 line group, and the first line of the most current 15 line group? This may be able to combine the "chopped up" particles you see in your final image.

See the Histogram Example.vi from the LabVIEW shipping examples for an example of performing image processing just inside an ROI. It is located at:

LabVIEW\examples\Vision\2. Functions\Analysis\Histogram Example.vi

Also see the attached VI for an example that I modified to test out the "Close" function of the IMAQ Morphology VI. I generated a crude test image in Paint, and the Close function seems to work very well with this image. I've attached it as well.

Let me know if this helps solve the problem. I think it'll give you some ideas, even if it doesn't prove a full solution.

Best Regards,

~Nate


Download All
0 Kudos
Message 14 of 14
(827 Views)