Jump to content

Mirror Image and Pixels inside Boundary


Recommended Posts

Hello!

Maybe this is an awkward question, but it seems to me as if Labview IMAQ doesn't have a function to mirror an image. Am I right?

I've got another question, though, and that is: assuming that one has a set of pixels that describe the boundary of an object in an image (i.e. one has the border pixels, e.g. obtained by a Sobel filter with subsequent thresholding), is it possible to compute the set of pixels "inside" this boundary?

Thanks a lot for your help.

best regards

Link to comment

QUOTE (professor_rumsdiegeige @ Apr 4 2008, 06:05 AM)

Yes it does. See the Pallet: Vision & Motion/Vision Utilities/Image Manipulation/IMAQ Symmetry.vi

QUOTE (professor_rumsdiegeige @ Apr 4 2008, 06:05 AM)

I've got another question, though, and that is: assuming that one has a set of pixels that describe the boundary of an object in an image (i.e. one has the border pixels, e.g. obtained by a Sobel filter with subsequent thresholding), is it possible to compute the set of pixels "inside" this boundary?

What do you mean compute? Histogram? count the number of pixels?

Once you have the boundary, make it into a mask and then applying that mask to the image, do whatever you want with the pixels inside it.

Neville.

Link to comment

QUOTE (Neville D @ Apr 4 2008, 06:04 PM)

Yes it does. See the Pallet: Vision & Motion/Vision Utilities/Image Manipulation/IMAQ Symmetry.vi

What do you mean compute? Histogram? count the number of pixels?

Once you have the boundary, make it into a mask and then applying that mask to the image, do whatever you want with the pixels inside it.

Neville.

Hi, thank you for your answer.

I tried IMAQ Symmetry, but evidently I got it wrong. When I use as parameter "Horizontal", it keeps on mirroring the image both in the horizontal AND in the vertical sense, which is quite weird.

With "compute" I mean that I need a list of the indices or the X/Y-coordinates of the pixels inside the boundary, for instance to display all pixels inside in red color in a segmentation map.

Link to comment

QUOTE (Neville D @ Apr 4 2008, 06:41 PM)

Thanks, now I got it. I mixed it up with a simultaneous call to an external DLL and it got mangled up…

QUOTE (Neville D @ Apr 4 2008, 06:41 PM)

Like I said, make a mask apply it and then your in business. It is always very slow (with IMAQ) to extract pixel or pt data and act on that. Use masks or ROI's to mark out a region and then process the region.

As to this point, I am still confused. I agree with your mask idea, but still I would need to know which pixels have to be masked. I only know the boundary pixels, and I could mask them. But how do I know which pixels lie inside this boundary?

Thank you very much again for your help. I appreciate that!

Link to comment

QUOTE (professor_rumsdiegeige @ Apr 5 2008, 02:24 AM)

I agree with your mask idea, but still I would need to know which pixels have to be masked. I only know the boundary pixels, and I could mask them. But how do I know which pixels lie inside this boundary?

Can you post some code to show what boundary you have got?

Rough hint: Use the boundary to generate a Region of Interest and then use the ROI to Mask VI to generate the mask. If mask is swapped use IMAQ inverse to swap the masked and unmasked regions.

Check out the mask examples as well.

Neville.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.